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

How would I make a ImageLabel keep rotating forever?

I know how to add while true do but I want it to rotate?

Do I do something like this?;

local imagelabel = script.Parent

while true do
	wait(0.5)
	imagelabel.Rotate = (360,1)
	wait(0.1)
end

please help!

2 answers

✓ Accepted answer
local imagelabel = script.Parent

while true do
	imagelabel.Rotation = imagelabel.Rotation  + 1
	wait(.05)
end

You just need to continually increase the rotation by 1.

8 comments

0

what will happen if it passes 360?

0

it would keep going, 361 is equal to 1 and so forth

0

so it will go on forever, idk why I got down voted xD

0

i downvoted because you didn't supply an explanation, your code is fine. if you add a good explanation i'll upvote

0

ok thanks

0

oh thanks

0

An infinite loop isn't the most efficient way to do this and you should probably use % 360 so that it keeps going back down to 0

0

You basically spoonfed him quantum also black look up the wiki and dont be just dumb "Can you please make it complete? where do I add imagelabel.Rotate? what does it equal too?"

while true do
	wait()
	for i = 1,360 do
 		--do your rotate script but instead make the numbers i
end		
end

Your script wouldn't work because you are setting the value to 360 and 1 not 1 through 360. It also seems that you don't know what commas are for in lua.I suggest reading up the wiki. http://wiki.roblox.com/index.php?title=API:Class_reference

1 comment

0

Can you please make it complete? where do I add imagelabel.Rotate? what does it equal too?

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