How To Raycast Directly in Front of HumanoidRootPart?

I got a question; how I can make the player position get close to the raycastResult.Instance let say 5 studs away from it but they don’t get stuck in the wall?