Spawn part a certain distance in mouse direction

I want to make a part show up 10 studs away in the direction the mouse is facing. My code just makes it spawn where the player is.

Code:

local StraightPart = Instance.new("Part")
StraightPart.Anchored = true
StraightPart.CanCollide = false
StraightPart.CFrame = CFrame.new(Character.HumanoidRootPart.Position, mouse.Hit.LookVector * 10) 
StraightPart.Parent = workspace

You were on the right track. You basically told it the angle to look but not how far out. Even though you multiplied by 10, it wouldn’t matter what you multiplied by in that case since it is only creating a point at HumanoidRootPart that’s facing the mouse.

StraightPart.CFrame = CFrame.new(Character.HumanoidRootPart.Position + mouse.Hit.LookVector * 10)