I have a BodyGyro for an aircraft, which I’m trying to set its X orientation to -2 degrees so it’ll face downwards:
-- This is fired on RunService.Heartbeat.
Gyro.CFrame = CFrame.Angles(math.rad(-2), math.rad(Main.Orientation.Y), 0)
local x,y,z = Gyro.CFrame:ToEulerAnglesXYZ()
print(math.deg(x))
It works fine when my aircraft is oriented forwards (betwen 90 and -90 degrees in the Y Axis).
However, when I make the aircraft face backwards, the Gyro’s CFrame points up instead. This is the output (first when I face the front, then the second when I go the other way):
Does anyone know why this happens and how I can fix this? Any help is appreciated.