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

oTrying to rotate my Image Button to make a refresh image (GUI)?

Hello. I've been recently trying to rotate my gui to make a refresh image, but even with the help of the internet I cannot find out how to do it. I've looked at several scripts :

while true do --Create a loop so it doesn't stop.
    wait(1) --Keep this here or else the script will lag.
script.Parent.Rotation = script.Parent.Rotation +.5 --Put this higher to increase the speed!
end 

But it doesn't work anymore, can someone help me?

1 comment

0

I'd suggest changing lines 1 and 2 into "while wait() do" for 2 reasons. 1. Your loop is very simple, 2. if you leave wait() blank, then it'll make a 1/30th of a second. Most animation is animated at 30 fps (1/30th a second)!

2 answers

✓ Accepted answer

You can keep the code how it is (although it's not very efficient) but you because this gui eventually gets replicated to the player, it needs to be put in a local script and not a server script

Hello, o_Khoi!

This script should work, just what you need to do is use a Local Script and place it as a children of the frame

Hope this helps

Good Luck with your games

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