Currently I’ve been trying to limit the body gyro rotation (specifically the pitch) of my model through CFrame:ToEulerAnglesXYZ() like in the local script shown below:

```
while wait(0.1) do
local x,y,z = SubRootPart.RotationGyro.CFrame:ToEulerAnglesXYZ()
print(math.round(math.deg(x)))
if WHeld == true and math.round(math.deg(x)) < 30 then
SubRootPart.RotationGyro.CFrame = SubRootPart.CFrame * CFrame.Angles(math.rad(5), 0, 0)
end
end
```

This works, sort of?

https://gyazo.com/3dfbe9d1b4af9328b12de8fb51ae9ccf

However, this doesn’t work so well after the model had rotated past a certain point (90 degrees i think) along its yaw, where the number changes to 180 and, at seemingly random, flips from negative to positive. Here’s just a few examples:

https://gyazo.com/67c34a35076bccbe5c98b36278657eee

https://gyazo.com/fcdc52401e6f4bca8f4ba93fe36d631f

https://gyazo.com/38d6fc925fe7fc59dc6c9551dd5f4cc3

I have seen other posts similar however I don’t quite understand them and I don’t wish to necro-bump them just to ask a question.