Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

I tried to make a loop with this but it won't work. Can you guys help?

I tried it, and it works once and never loops.

local thrust = Instance.new("BodyVelocity")
	thrust.velocity = Vector3.new(0,10,0)
	thrust.maxForce = Vector3.new(0,4e+050,0)
	thrust.Parent = script.Parent.Torso 
wait(2)
script.Parent.Torso.BodyVelocity:remove()
wait(4)

1 answer

✓ Accepted answer
while true do
wait()
local thrust = Instance.new("BodyVelocity")
    thrust.velocity = Vector3.new(0,10,0)
    thrust.maxForce = Vector3.new(0,4e+050,0)
    thrust.Parent = script.Parent.Torso 
wait(2)
script.Parent.Torso.BodyVelocity:remove()
wait(4)
end

2 comments

0

Thank You

0

Oh and here is another way to loop while wait() do and remove the wait() under while true do :D Also repeat works.

This discussion is preserved as it was. New answers, comments, and votes are closed.