how can i detect ledges for the player and make him get up

the issue is idk how to do it should i make a lot of raycasts or a checksphere ? how can i make conditions for it to work like when its detected or not i wanna avoid using colliders but im really stuck with it i tried raycasts but didnt know where to put them and when the player is on ledge

Just make a raycast from the player and it when it collides with a ledges checksphere you can climb onto it. I guess I can show you some code if you need further help