Hi. I am attempting to rotate a model 180 degrees. The whole model. However, what I am doing is producing the wrong results and I'm getting pretty frustrated.
Here is my code.
for i = 1,36 do
sp1.worker:SetPrimaryPartCFrame(sp1.worker:GetPrimaryPartCFrame() * CFrame.Angles(0, math.rad(5), 0))
wait()
end
5 degrees * 36 is equal to 180 degrees.
Therefore, this should perfectly rotate the model 180 degrees. When I use this code in the command line while in studio, it does exactly that. When I run it in my LocalScript, it rotates the model about 35-ish degrees and stops.
This is really irritating and I have no idea what I'm doing wrong.

5 comments
I always have the same issue! When I try something in studio, it works fine. Yet if I try to do it in-game it doesn't work! Looking forward to seeing the answer.
Instead of math.rad(5) try using math.pi
Even when I convert the 5 degrees to radians myself by doing (5 * math.pi)/180, the results are the same.
@Cryptekan the problem is that when I run this code in the Command line without the game running, it rotates the model perfectly. When I play solo or test online by updating it, the results are completely different. I don't understand why it wouldn't work the same.
Fixed it. Something else which SHOULDN'T affect this at all was interfering. Thanks for the thoughts, though.