I am making a ledge climbing script and want to stop the player at the edge of the ledge but i cant figure out how to detect the edge of a part so the player doesn’t go beyond the ledge
I mean, you could probably achieve this by using a raycast ,slightly to the right or left of the character (depending on the direction they are moving), aimed in the same way they are facing. If the raycast goes more than like 1 stud then you can assume they have reached a ledge.
There are probably better methods, but this is just the solution I came up with