On trigger exit

could anyone explain me why this code doesn’t work?
This script is basicly for a ladder.

public class LadderControll : MonoBehaviour {
public CharacterController controller;
public GameObject player;
	
void Start(){		
		player = GameObject.Find("Player"); 
		controller = player.GetComponent<CharacterController>();
	}
		
void OnTriggerEnter(Collider other){
		if (other.gameObject.name == "Player"){
			controller.slopeLimit = 95;
			}	
	}

		
void OnTriggerExit(Collider other){
	if (other.gameObject.name == "Player"){
		controller.slopeLimit = 45;
		}	
	}
}

thanks in advance!

try

public class LadderControll : MonoBehaviour {
public CharacterController controller;
public GameObject player;
 
void OnTriggerEnter(Collider other){
       if (other.gameObject.name == player.tag){
         controller.slopeLimit = 95;
         }    
    }
  
void OnTriggerExit(Collider other){
    if (other.gameObject.name == player.tag){
       controller.slopeLimit = 45;
       } 
    }
}