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

[This is reallly getting old| GUI ROTATION] If this isnt a scripting site then what is it?

This is really getting old! Having People View A Simple Script and Not Responding. No wiki article no examples no help at all! If this is a scripting help site where is the help?

while true do
    wait(0.01) 
    script.Parent.Rotation = script.Parent.Rotation +1
    if script.Parent.Rotation == 10 then 
        script.Parent.Rotation = script.Parent.Rotation -1
        if script.Parent.Rotation == -10 then 
            script.Parent.Rotation = script.Parent.Rotation +1
        end
    end
end

2 answers

✓ Accepted answer

Please don't complain. I have edited the script below to work as BlueTaslem has described.

for i = 1, 10 do
	script.Parent.Rotation = script.Parent.Rotation + 1
	wait()
end

while true do
	for i = 1, 20 do
		script.Parent.Rotation = script.Parent.Rotation - 1
		wait()
	end
	for i = 1, 20 do
		script.Parent.Rotation = script.Parent.Rotation + 1
		wait()
	end
end

4 comments

1

I don't think this is quite what he wanted. I'm guessing he wanted it to move back and forth between -10 and 10 -- this will just keep spinning but pause momentarily at 10 degres.

0

Yea thats what I wanted Blue!

1

I have edited the script to what BlueTaslem has described.

0

Okay Thanks!

Try using a UDim2, replace +1 with UDim2.new(0, 1)

1 comment

0

'UDim2.new' is mainly used for a GUIs Size and Position.

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