Help with Tool.Grip

Okay, so I am setting the Grip property of a tool with a script.
I set it to

CFrame.new(0, 0, 0) * CFrame.Angles(0, 90, 0)

which should be a CFrame with a position value of (0, 0, 0) and a rotation value of (0, 90, 0), but, when I go to check the property it has a rotation value of (0, 116.621, 0). I am so confused, please help!

The Thing about CFrame.Angles is that Its not Measured in Degree’s but Radians, Which is used in stuff like Trigonometry, but in short:
90 Degrees in radians is math.pi/2
180 degrees in radians is math.pi

If you want to Convert between the two Measurements, use math.rad to convert from Degree’s to Radians, and math.deg to convert Radians to Degrees.

2 Likes

oh, so I need to use math.rad?

1 Like

You’re running into this problem because CFrame.Angles is being measured in degrees. Instead, you can either use @Cairo’s suggestion and use math.pi / 2 which is equivalent to 90 degrees, or you can use math.rad(90) to convert from degrees to radians.

1 Like

I swear I have used it without radians before and it worked fine???

You might be thinking of Orientation, which does take degrees. CFrame.Angles does not.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.