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

What's wrong with this GUI?

I want this script to rotate but it doesn't seem to work

script.Parent:TweenPosition(UDim2.new(0.35,0,0.3,0), "Out", "Quad", 20) --Tween works
wait(10)
while true do
script.Parent.Rotation = +1
end

My friend said that you can't have a + so you need to do something else. This is in a local script so is there gonna be a slight problem with that?

1 answer

✓ Accepted answer

Your friend is right, you do need something else. You need to have a rotation for the script to base off of.

So it would be script.Parent.Rotation = script.Parent.Rotation + 1

Warning your script will crash people on entry! Add a wait to the while true do loop.

Fixed code;

script.Parent:TweenPosition(UDim2.new(0.35,0,0.3,0), "Out", "Quad", 20) --Tween works
wait(10)
while true do
script.Parent.Rotation = script.Parent.Rotation + 1
wait()
end

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