I'm scripting a fan that lets the fan blades rotate around repeatedly at a specified pace. My problem is that the fan blades start to speed up over time.
blades = script.Parent:GetChildren() spinSpeed = 0.005 mathStart = 0 --angle start? mathSpinRate = 0.005 while true do for _,v in pairs(blades) do if v.Name == "Union" then v.CFrame = v.CFrame * CFrame.Angles(0,math.rad(mathSpinRate),0) mathStart = mathStart+mathSpinRate end end wait(spinSpeed) end
on line number 10 you have mathStart = mathStart + mathSpinRate which then starts to stack the value upon itself.
try mathStart = mathSpinRate instead.