I'm currently making something where a player can press R and a part gets rotated by 90 degrees, but for some reason it always defaults to some other rotation (270 degrees changes to about 10, 90 degrees changes to about 63, etc). This is essentially what I am using right now:
--NOTE: position is a Vector3 and rotation is an integer CFrame.new(position+Vector3.new(2,2,2))*CFrame.Angles(0,rotation,0)
The position itself works fine, but the angle is never correct. Any help would be appreciated, thanks!
CFrame.Angles
' three parameters are expected to be in radians, not degrees. This can be remedied rather easily:
CFrame.new(position+Vector3.new(2,2,2))*CFrame.Angles(0,math.rad(rotation),0)
Hope this helped.
More on CFrame.Angles
& math.rad
.