How to get part's x axis rotation to be 360 degrees and not 180

I currently am trying to create a script to detect if a player does a flip on the bike. My goal was to have the script set a certain set of variables to true if they make it to certain points along the axis in orientation (1/4 flip would be 90, 1/2 would be 180, full would be 360 returning to the original point). My problem is, I can’t seem to figure out how to get the angle to 360 degrees. As you can see in the gif, it goes up to 90 and then reverses. I want it to go up to 360 and then hit 0 or visa versa.
https://gyazo.com/912dd8b2701c1115f6ad11d786e7486a

while true do
	wait()
	local x, y, z = script.Parent.Chassis.Engine.CFrame:ToOrientation()
	print(math.deg(x))
end

That is what i did just to print the angle.

should work

while wait() do
local x = script.Parent.Chassis.Engine.Orientation.X
if x < 0 then
x = x+360
end
print(x)
end
2 Likes