Hi! In my experience, I find that it’s best to base orientation-based things off the HumanoidRootPart, mainly because it doesn’t rotate with animations (while the UpperTorso does). Try this instead:
local raycast = workspace:Raycast(
plr.Character:WaitForChild("HumanoidRootPart").Position,
plr.Character.HumanoidRootPart.CFrame.LookVector*100, --100 studs ahead of where the player is facing
raycastParams
)