collider doesnt work the 2nd time

I have a platform with a game object attached to it that checks when something enters it, when my player enters it, it will disable its collider and when it exits it will re enable it. what it does is disable, collide with the platform once, and when it comes back down it disables it again for some reason… i have a gameobject attached to the ball with a trigger.
void OnTriggerEnter2D(Collider2D other){
player.collider2D.enabled = false;

	}
	void OnTriggerExit2D(Collider2D other){
		player.collider2D.enabled = true;
	}

the script on the platform gameObject^

Basically what must be happening is when the child object enters platform (OnTriggerEnter2D executes) , Player collider is disabled.

But when child exits (OnTriggerExit2D executes), Player collider is Enabled.

But when a collider is enabled inside another collider OnTriggerEnter2D is called

. This enabling of player’s collider inside Platform might be disabling it again by calling OnTriggerEnter2D again…

To avoid this you must check if the Collider2D “other” does not belong to player. If does not then execute the following code.