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

GUI - How to make a rotation effect?

Asked by 5 years ago

I have tried looking online and everywhere for this but I cannot find what I'm looking for. Basically what I am trying to look for is a rotation effect on a image for a loading screen. Example. Some games like Phantom Forces and Heists have a rotating Roblox logo image as their loading GUI. That's what I want but I cannot find any information on how to do this. This is why I am asking. Someone please help me!

2 answers

Log in to vote
2
Answered by 5 years ago

You can use "Rotation" to rotate GUIs.

while true do --Create a loop so it doesn't stop.
    wait(0) --Keep this here or else the script will lag.
script.Parent.Rotation = script.Parent.Rotation +.5 --Put this higher to increase the speed!
end 
0
Why are you trying to wait 0 seconds, why even wait at all at that point theCJarmy7 1293 — 5y
1
If you take it off it'll lag studio CaptainAlien132 225 — 5y
0
What CJarmy is trying to say is, waiting zero seconds is pointless because by default the shortest interval between any wait call is around 0.03 seconds. If that default interval wasn't set, then waiting zero seconds would be pointless because it's equivalent to not waiting at all. ScriptGuider 5640 — 5y
1
Yeah but Wait() and wait(0) are literally the same thing, so he was just putting wait(). Yeah the 0 isn't necessary but nothing wrong with it TiredMelon 405 — 5y
View all comments (3 more)
0
There is something wrong with it -- readability. There's functionally no difference between `_ = 1` and `number = 1`, but we don't use underscores for important variable names because it is misleading and does not clearly show the intent of the code, just like using wait(0). ScriptGuider 5640 — 5y
0
Oops, didn't realize I put a 0 CaptainAlien132 225 — 5y
0
0 doesnt matter. But if he has it set to where wait() can go to the exact value then it does matter. Thats why I try to put it at some certain number, Sergiomontani10 236 — 5y
Ad
Log in to vote
0
Answered by 4 years ago

I was trying to make the Image spin like Roblox Icon. So I made myself. Enjoy this!


Make sure to put this script in whatever you want to spin.


while true do
    script.Parent.Rotation = script.Parent.Rotation + .1
    wait()
    script.Parent.Rotation = script.Parent.Rotation + .2
    wait()
    script.Parent.Rotation = script.Parent.Rotation + .3
    wait()
    script.Parent.Rotation = script.Parent.Rotation + .4
    wait()
    script.Parent.Rotation = script.Parent.Rotation + .5
    wait()
    script.Parent.Rotation = script.Parent.Rotation + .6
    wait()
    script.Parent.Rotation = script.Parent.Rotation + .7
    wait()
    script.Parent.Rotation = script.Parent.Rotation + .8
    wait()
    script.Parent.Rotation = script.Parent.Rotation + .9
    wait()
    script.Parent.Rotation = script.Parent.Rotation + 1
    wait()
    script.Parent.Rotation = script.Parent.Rotation + 1.25
    wait()
    script.Parent.Rotation = script.Parent.Rotation + 1.5
    wait()
    script.Parent.Rotation = script.Parent.Rotation + 1.85
    wait()
    script.Parent.Rotation = script.Parent.Rotation + 2.5
    wait()
    script.Parent.Rotation = script.Parent.Rotation + 3
    wait()
    script.Parent.Rotation = script.Parent.Rotation + 4
    wait()
    local i = 0
    repeat
    script.Parent.Rotation = script.Parent.Rotation + 5
    i = i + 5.65
    wait()
    until i >= 360
    script.Parent.Rotation = script.Parent.Rotation + 4
    wait()
    script.Parent.Rotation = script.Parent.Rotation + 3
    wait()
    script.Parent.Rotation = script.Parent.Rotation + 2.5
    wait()
    script.Parent.Rotation = script.Parent.Rotation + 1.85
    wait()
    script.Parent.Rotation = script.Parent.Rotation + 1.5
    wait()
    script.Parent.Rotation = script.Parent.Rotation + 1.25
    wait()
    script.Parent.Rotation = script.Parent.Rotation + 1
    wait()
    script.Parent.Rotation = script.Parent.Rotation + .9
    wait()
    script.Parent.Rotation = script.Parent.Rotation + .8
    wait()
    script.Parent.Rotation = script.Parent.Rotation + .7
    wait()
    script.Parent.Rotation = script.Parent.Rotation + .6
    wait()
    script.Parent.Rotation = script.Parent.Rotation + .5
    wait()
    script.Parent.Rotation = script.Parent.Rotation + .4
    wait()
    script.Parent.Rotation = script.Parent.Rotation + .3
    wait()
    script.Parent.Rotation = script.Parent.Rotation + .2
    wait()
    script.Parent.Rotation = script.Parent.Rotation + .1
    wait()
    script.Parent.Rotation = script.Parent.Rotation + 0
    wait(2.5)
end

Answer this question