Uncharted style climbing? What scripting?

I would like to make a climbing aspect to my game, where only certain sections of cliff will let you stick to them, while others you’ll slip as you veer into them and ultimately fall if your whole character moves into that section of wall. Im new to scripting in unity and have no idea what method or function I could use to make this magnet like behavior happen. Please help!!

You add a rigidbody and collider to your player. Then you add a collider to your cliff sections, and tag them as “climbable”, “slippy”, or whatever.

Then, when your player collides with the cliff section, you use:

OnCollisionEnter(collision col) {
  if col.gameObject.CompareTag("Climbable")
    .... // let the player climb
  else if col.gameObject.CompareTag("Slippy")
    ... // make the player slip