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

How to make a for loop execute a certain amount of times?

I am trying to make rotating text on a screengui. The text will do a full 360 turn and be back normal, however, I am using a for loop and can't make it execute a certain number of times.

Attempt:

for I in 360 do
	wm.Rotation = wm.Rotation + 1 -- wm is WelcomeMsg, located in the same directory
end

Can I please have some help?

1 answer

✓ Accepted answer

Here we can see here you are trying to rotate the part like this: You has 2 error, your first was when you trying to use for i = 1, 360 do your second was at line 3 with rotation you forgot too put "Vector3"

for i = 1, 360 do
	wait(0.1)
	wm.Rotation = wm.Rotation + i
end

3 comments

1

It works anyway, Thanks!

0

You're welcome !

0

you've made an slight error xToon. He was trying to set a GUI rotation, and not a 3d model rotation or cframe

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