In my game, i have a part which i want to spin around, only problem is, i don't know how to do it. This is what i've tried doing:
while wait() do script.Parent.CFrame = script.Parent.CFrame * CFrame.Angles(0, Orientation, 0) if Orientation == 360 then Orientation = 0 end Orientation = Orientation + 1 wait(0.05) end
All it does is it makes it spin around, but at increments of over 100 degrees instead of 1 degree, i tried making the wait time slower but that doesn't change the jerky spinning problem, it only makes it jerk around at a slower rate.
Try this:
local part = script.Parent
game:GetService("RunService").Stepped:Connect(function(dt) if (part) then part.CFrame = part.CFrame * CFrame.Angles(0, (math.rad(dt - tick())%60), 0) end end)