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?
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:
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.