How to make character face upwards while still able to rotate

I want the character to face straight upwards, while still being able to rotate on the y axis. I’m doing this for a knockdown system

What I have right now

game:GetService("RunService").Heartbeat:Connect(function()
  if Knockdown then
    local pos = hrp.CFrame.Position
    hrp.CFrame = CFrame.lookAlong((Vector3.new(pos.X, 681, pos.Z), Vector3.new(0, 1, 0))
  end
end)

I want to replace the 0s with something related to the camera’s CFrame, but im not sure how i would go about it. If there is a better way that isnt Cframe.LookAlong, pls tell me

game:GetService("RunService").Heartbeat:Connect(function()
    if Knockdown then
        -- Get the current position of the HumanoidRootPart
        local pos = hrp.Position
        
        -- Extract the Y-axis rotation from the camera's CFrame using ToEulerAnglesYXZ
        -- The first and third values returned are ignored since we only care about the Y-axis rotation
        local _, camYRotation, _ = workspace.CurrentCamera.CFrame:ToEulerAnglesYXZ()
        
        -- Set the character's CFrame to face upwards (90 degrees on the X-axis)
        -- and apply the Y-axis rotation from the camera
        hrp.CFrame = CFrame.new(pos) * CFrame.Angles(math.pi / 2, camYRotation, 0)
    end
end)