How do i make a player rotate backwards / frontwards instead of the sides using BodyAngularVelocity?

I just want the player rotated on his back or front during ragdoll and want to make sure of it using BodyAngularVelocity.

	local OrientationX = Torso.Orientation.X
	
	if OrientationX <= 0 then
		if OrientationX > -45 then
			local AngularVelocity = Instance.new("BodyAngularVelocity",Torso)
			AngularVelocity.AngularVelocity = Vector3.new(-18,0,0)
			AngularVelocity.MaxTorque = Vector3.new(math.huge,0,0)
			AngularVelocity.P = math.huge
			task.delay(0.1,function()
				AngularVelocity:Destroy()
			end)
		end
	elseif OrientationX > 0 then
		if OrientationX < 45 then
			local AngularVelocity = Instance.new("BodyAngularVelocity",Torso)
			AngularVelocity.AngularVelocity = Vector3.new(18,0,0)
			AngularVelocity.MaxTorque = Vector3.new(math.huge,0,0)
			AngularVelocity.P = math.huge
			task.delay(0.1,function()
				AngularVelocity:Destroy()
			end)
		end
	end

I’ve tried this code, but obviously the player will rotate by his sides depending on the direction hes rotated to