Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Can I have help with Rotation again?

Asked by 9 years ago

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)
0
We'll need the full script to see what you did wrong. adark 5487 — 9y
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 aquathorn321 858 — 9y

1 answer

Log in to vote
0
Answered by 9 years ago
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. :)

0
I think I fixed it :3 sammy52520 45 — 9y
0
Yep, that looks correct. For standards, though, `wait (0.1)` should be written `wait(0.1)`. adark 5487 — 9y
Ad

Answer this question