Problem with CFrame.fromEulerAnglesXYZ when using Shift Lock

I wanted to make a Bicycle Kick move for my football/soccer game. I used CFrame.fromEulerAnglesXYZ on my torso to make it ‘flip’.

The issue is that, when Shift Lock is enabled, the torso orientates the wrong way.

I could not find any solutions regarding this problem

The Function Code (Not entire script, I believe the problem occurs here):

    -- T is the Torso
    T.CFrame = T.CFrame * CFrame.fromEulerAnglesXYZ(math.pi/2,0,0)
	T.CFrame = T.CFrame + Vector3.new(0,1.2,0) -- Probably unrelated
	
	mod.float()
	mod.trip()

Module (mod)

function module.trip()
	local hum = char:FindFirstChild("Humanoid")
	if hum then
		hum:ChangeState(Enum.HumanoidStateType.FallingDown)
		if not fell then
			AV = Instance.new("BodyAngularVelocity")
			AV.Parent = T
			AV.AngularVelocity = Vector3.new(0,0,0)
			game:GetService("Debris"):AddItem(AV,0.5)
			script.Clock.Event:Connect(function()
				game:GetService("Debris"):AddItem(AV,0.1)
			end)
		end
	end
end

function module.float(m)
	local BV,Y = Instance.new("BodyVelocity"),T.Velocity.Y
	BV.Parent = T
	if Y > 0 then Y = -Y end
	local h = Vector3.new(0,-5,0)
	if m then
		h = Vector3.new(0,-10,0)
	end
	local VEL,MAX = T.Velocity * Vector3.new(1,0,1) + h,Vector3.new(10e+8,10e+8,10e+8)
	BV.Velocity,BV.MaxForce = VEL,MAX
	game:GetService("Debris"):AddItem(BV,0.35)
	
end

A video showing me activating Bicycle Kick with and without Shift Lock enabled

Please ask me some questions if you are curious about some other things