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

GUI - How to make a rotation effect?

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

✓ Accepted answer

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 

7 comments

0

Why are you trying to wait 0 seconds, why even wait at all at that point

1

If you take it off it'll lag studio

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.

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

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).

0

Oops, didn't realize I put a 0

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,

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

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