while true do script.Parent.CFrame=CFrame.new(5,-90,0) wait() script.Parent.CFrame=CFrame.new(10,-90,0) wait() script.Parent.CFrame=CFrame.new(15,-90,0) wait() script.Parent.CFrame=CFrame.new(20,-90,0) wait() script.Parent.CFrame=CFrame.new(25,-90,0) wait() script.Parent.CFrame=CFrame.new(30,-90,0) wait() script.Parent.CFrame=CFrame.new(35,-90,0) wait() script.Parent.CFrame=CFrame.new(40,-90,0) wait() script.Parent.CFrame=CFrame.new(45,-90,0) wait() script.Parent.CFrame=CFrame.new(50,-90,0) wait() end
You CFramed the part to different positions. You did not use a specific method such as CFrame.Angles
(x, y, z) or CFrame.fromEulerAnglesXYZ
(x, y, z). For that particular reason your infinite loop just re-locates the part to different locations.
You want the part to rotate so you would have to use the CFrame.Angles
(x, y, z) method or the CFrame.fromEulerAnglesXYZ
(x, y, z) method. Let me demonstrate how you would use both of these methods to make the part rotate.
Script for CFrame.Angles()
method:
while wait() do -- Infinite loop with a wait inside of it. script.Parent.CFrame = script.Parent.CFrame * CFrame.Angles(0.1, 0.1, 0.1) -- Multiplying the original CFrame in increments of 0.1 every time the loop runs. Using the CFrame.Angles() method end -- End for the loop
Here is the script for the CFrame.fromEulerAnglesXYZ()
method there are pretty much the same with different methods:
while wait() do -- Infinite loop with a wait inside of it script.Parent.CFrame = script.Parent.CFrame * CFrame.fromEulerAnglesXYZ(0.1, 0.1, 0.1) -- Multiplying the original CFrame in increments of 0.1 every time the loop runs. Using the fromEulerAnglesXYZ() method. end -- End for the loop
~~ KingLoneCat
Try this, I made this just now, and tested it, it worked for me, so good luck! (Insert it into your object)
while true do script.Parent.CFrame = script.Parent.CFrame * CFrame.fromEulerAnglesXYZ(0,0.01,0) wait(0.0006) end