How to make a moving platform in Roblox Studio easy

Опубликовано: 21 Март 2025
на канале: capthehacker99
8,201
105

local at = false
script.Parent.Touched:Connect(function(prt)
if prt == nil or prt.Parent == nil or prt.Parent:FindFirstChildOfClass("Humanoid") == nil then return end
if at then return end
at = true
wait(1)
local tyme = time()
script.Parent.Velocity = Vector3.new(30,0,0)
game:GetService("RunService").Stepped:connect(function()
script.Parent.CFrame = script.Parent.CFrame+Vector3.new((time()-tyme)*30,0,0)
tyme = time()
end)
end)