OnTriggerEnter and -Exit not getting called

I’m trying to make text appear if the player is inside a trigger and presses ‘t’, but OnTriggerEnter doesn’t get called when I enter the trigger. I’ve double checked the layers, tags, if the player has a rigidbody and if the collider is set to trigger but I can’t find the problem. I’m at my wits’ end.

Also, my game is in 2D in case that makes any difference.

public int conStage = 1;
public bool trigger;

void OnTriggerEnter (Collider other){
	if (other.gameObject.tag == "Player") {
		trigger = true;
	}
}

void OnTriggerExit (Collider other){
	if (other.gameObject.tag == "Player") {
		trigger = false;
	}
}

void Update (){

	if (Input.GetKeyDown (KeyCode.T) && trigger == true) {
		conStage = conStage + 1;
	}

}

}

Nevermind, I figured it out.
I just had to add 2D at the end.

void OnTriggerEnter2D (Collider2D other){

void OnTriggerExit2D (Collider2D other){