Part stops rotating at a certain point

I want to make my part rotate forever but as the title says, it stops rotating at a certain point.

This is my script.


(the script is in startergui)

This is what happens.

1 Like

Hey there!
For this I would recommend using CFrame.Angles, here is an example of how the code should look like:

object.CFrame = object.CFrame * CFrame.Angles(math.rad(rotSpeed),0,0)
4 Likes

Or, you could use AngularBodyVelocity instance to do the job instead.

Thanks, this works great but do you know why my script wasn’t working? I want to know so that I don’t run into this type of issue again.

I am not sure why it was doing that, could be because when it went up to 180° it reset to a different value, I had a similar problem before but I forgot why it did that