How do I make this repeat?
while (true) do script.Parent.Humanoid:MoveTo(Vector3.new(-13, 0.59, 31) ) wait(3) script.Parent.Humanoid:MoveTo(Vector3.new(23, 0.79, 31) ) wait(3) script.Parent.Humanoid:MoveTo(Vector3.new(23, 0.79, -6) ) wait(3) script.Parent.Humanoid:MoveTo(Vector3.new(-13, 0.59, -6) ) wait(3) return end
I put in while (true) do but it doesn't loop any ideas?
while true do script.Parent.Humanoid:MoveTo(Vector3.new(-13, 0.59, 31) ) wait(3) script.Parent.Humanoid:MoveTo(Vector3.new(23, 0.79, 31) ) wait(3) script.Parent.Humanoid:MoveTo(Vector3.new(23, 0.79, -6) ) wait(3) script.Parent.Humanoid:MoveTo(Vector3.new(-13, 0.59, -6) ) wait(3) end
There you go. Thats what a while loop looks like. And if it doesnt matter, oh well.
while wait() do --Loops need a wait() script.Parent.Humanoid:MoveTo(Vector3.new(-13, 0.59, 31) ) wait(3) script.Parent.Humanoid:MoveTo(Vector3.new(23, 0.79, 31) ) wait(3) script.Parent.Humanoid:MoveTo(Vector3.new(23, 0.79, -6) ) wait(3) script.Parent.Humanoid:MoveTo(Vector3.new(-13, 0.59, -6) ) wait(3) end