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

Rotating a surface GUI?

Asked by 6 years ago
wait(0.5)
while true do
script.Parent.Textlabel.Rotation = 2
wait(0.0001)
script.Parent.Textlabel.Rotation = 2
wait(0.0001)
script.Parent.Textlabel.Rotation = 2
wait(0.0001)
script.Parent.Textlabel.Rotation = 2
wait(0.0001)
script.Parent.Textlabel.Rotation = 2
wait(0.0001)
end

I have a Surface GUI on the side of a gun, and it has infinite ammo, and so i have a infinite sign on it, How would i make it rotate so it will look "Noice"

I made the script above to attempt it, but it didnt work! Thanks aton! James Bread Armyofdeath909

1 answer

Log in to vote
-1
Answered by 6 years ago

What you need to do is make a loop with a variable that goes up a certain amount each time it "goes around", while setting the rotation to said variable. Here's some sample code.

local gui = script.Parent.TextLabel;

local startrotation, increment, endrotation = 1, 2, 9e9

for variable = startrotation, increment, endrotation do
    gui.Rotation = variable;
    wait();
end;
0
This is a really poor method. CootKitty 311 — 6y
0
Instead of bashing on the only method I know how that is at least somewhat efficient, why not give a better suggestion? On top of that, you down voted, again with no explanation. You know what I think? I think you just prefer a different way, so you decided to bash on my perfectly good way. Good day to you. MedievalBeast4 4 — 6y
0
This is a really poor method. dyril6 0 — 1y
Ad

Answer this question