Let’s say I’ve got a raycast firing from the humanoid’s torso like this
local ray = workspace:Raycast(torso.Position, torso.CFrame.lookVector * 5)
This is for a ledge climbing script I’ve been working on, I have everything figured out but I can’t seem to understand how I would make the humanoid face the wall the raycast hits
How could I make the humanoid look against the face of the part hit by the ray? I’ve been looking for solutions yet couldn’t find any.
This solution results in the player looking towards the raycast position itself, so if the player does the ledge climb at an angle, they won’t face the wall directly
Actually, there is a better and easier approach. If you read through the documentation, you will find that you get the normal from a raycast’s intersection. You can make your character look in the negative direction of that normal.