How to get the mouse position at a specific y coordinate (continuing the direction until it reaches the coordinate)

Right now I want to know how to get the mouse position at the same y coordinate as the humanoid root part of the player.
Here’s what I’m doing currently:

-- create hitbox for ray
local hitBox = mouseHitBox:Clone() -- has a size of like (500,1,500) so the mouse it hovering over it
hitBox.Position = rootPart.Position
hitBox.Parent = workspace
-- create ray
mouseParams.FilterDescendantsInstances = {hitBox} -- whitelist
local mouseRay = workspace:Raycast(mouse.UnitRay.Origin, mouse.UnitRay.Direction * 300, mouseParams)

https://gyazo.com/e631fc56095802d0fe36f636dde12048
In the video, the character is looking at the mouse position, ignore the mouse.Hit position from the part behind the player, and continuing the direction until it reaches the invisible hitbox.
If I were to just use mouse.Hit, the character would be looking at the part.
Although this works, I want to know a different way to do this without creating a new part.

I updated the code to this:

local mousePosition = mouse.UnitRay.Origin
local direction = mouse.UnitRay.Direction
local distance = 0
while math.abs(rootPart.Position.Y - mousePosition.Y) > 2 do
	distance += 1
	mousePosition = mouse.UnitRay.Origin + (direction * distance)
end

This gets the correct mouse position, but it takes down performance greatly…

This is what I ended up doing:

local center = mainCam.ViewportSize/2
local mousePos = userInputService:GetMouseLocation()
local rise = center.Y - mousePos.Y
local run = mousePos.X - center.X
local angle = math.deg(math.atan2(rise, run)) + camAngle
rootPart.CFrame = CFrame.new(rootPart.Position) * CFrame.Angles(0,math.rad(angle-90), 0)

I don’t really need the mouse position if I know the angle to look towards.