Ok so I am making a gear model and i input a script inside of it for its rotation:
Script
local model = script.Parent
local rad = math.rad
local rotateAmount = 1
while true do
wait(0.002)
local newCFrame = model.PrimaryPart.CFrame * CFrame.Angles(45, rad(rotateAmount),0)
model:SetPrimaryPartCFrame(newCFrame)
end
But there was something wrong with it, I can’t control the rotation speed using the rotateAmount, if I input any numbers below or above 0, the model would rotate with weird angles and random speeds. Can anyone help? ![]()