How to stop wall climbing

Whenever my character jumps and collides with a wall he gets stuck and then can climb higher. I don’t want the player to be able to do this. Any advice on how to prevent this?


That’s a pretty common bug in games, but I don’t know how to fix it.