DOPE = game.Workspace:FindFirstChild("DOPE") FINISHED = "Finished Rotating Part, now what" i = 0 function rotate() for i > -1 do for 1 < 19 do wait(1) DOPE.Rotation = CFrame.new(0,i + 1,0) end end rotate()
You had a few things wrong and I'll show you each separately.
DOPE = game.Workspace:FindFirstChild("DOPE") FINISHED = "Finished Rotating Part, now what"
Not sure why FINISHED
is there but kept it anyway.
function rotate() for i=1,10 do wait(1) DOPE.Rotation = Vector3.new(0,i+1,0) end end rotate()
I think you were getting your thinking of how the for i
works for loops. You change 10
to the amount of times you want the loop to run. Also Rotation is not a CFrame
value its a Vector3
value.
All together now
DOPE = game.Workspace:FindFirstChild("DOPE") FINISHED = "Finished Rotating Part, now what" function rotate() for i=1,10 do wait(1) DOPE.Rotation = Vector3.new(0,i+1,0) end end rotate()