Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make a my rotation script for a GUI loop its self over and over?

Asked by 4 years ago

So I have a rotation script that works, but I want it to continue to rotate like it is and it only rotates 3 times then ends there is not red underline in the script, and the developer counsel does not say what went wrong so what went wrong? Here is the script. (I have no idea how to loop it.)

---Script---

if script.Parent.Rotation == -9 then
    wait(1)
    script.Parent.Rotation = 9
    wait(1)
if script.Parent.Rotation == 9 then
    wait(1)
    script.Parent.Rotation = -9
end 
end

1 answer

Log in to vote
1
Answered by 4 years ago

This isn't the best script I have ever seen. But, you can easily do:

while wait(2) do
script.Parent.Rotation = 9
wait(1)
script.Parent.Rotation = -9
Ad

Answer this question