How would i create a ledge grab system

How would I create a system where you can hang on to ledges and move left and right. I haven’t seen any topics on how to do this.