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

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

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

✓ Accepted answer

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

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