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

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

Asked by 10 years ago

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

Log in to vote
1
Answered by 10 years ago

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
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. BlueTaslem 18071 — 10y
0
Yea thats what I wanted Blue! Timster111 25 — 10y
1
I have edited the script to what BlueTaslem has described. FearMeIAmLag 1161 — 10y
0
Okay Thanks! Timster111 25 — 10y
Ad
Log in to vote
-5
Answered by
Mr1Vgy 30
10 years ago

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

0
'UDim2.new' is mainly used for a GUIs Size and Position. TheeDeathCaster 2368 — 10y

Answer this question