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

Can I have help with Rotation again?

Ok I have used this script many times however It has failed me. I am wanting to have an object rotate in a loop however I need help with applying the loop I know it is a while wait statement but I tried applying it and I am guessing I wrote it wrong. I am going to give you guys the script before the "while wait do". And if it is ok please give me an example of applying the statement. Thank you.

local part = workspace.Drum 
while wait do
part.CFrame = part.CFrame * CFrame.Angles(math.rad(9), math.pi, math.rad(180)) 
wait (0.1)

2 comments

0

We'll need the full script to see what you did wrong.

0

it could be you're just not seeing the rotation, though that may not be the case with 9 degree increments. Is your script outputting any errors? You might need to add an "end" at the bottom of the script

1 answer

local part = game.Workspace.model.Chandelierpart4
while wait(.1) do
	part.CFrame = part.CFrame * CFrame.Angles(math.rad(5), 1,0)
end

Here is the answer I found it out. :)

2 comments

0

I think I fixed it :3

0

Yep, that looks correct. For standards, though, wait (0.1) should be written wait(0.1).

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