Destroy an enemy without destroying the player

Fist of all I am an absolute begginer I have a 2d platformer in which I have a Mario like squishing mechanic when I jump on an enemy it dies.So I have created a box with a trigger box colider2d on to the enemy which is the child object to it and if I jump on the box first it should destroy the enemy and if touch it instead it should kill me, but instead when I jump on the box it destroyes the enemy after which it kills me as well…which means that the enemy script is running as well

here is the box trigger script

void OnTriggerEnter2D(Collider2D other)
	{
		if (other.tag == "Player")
		{
			Destroy(transform.parent.gameObject);
			Destroy(gameObject);

		}
	}

and here is the enemy script

private bool fall;
public GameObject Player;
public Transform spawnPoint;
public bool stomp;

// Use this for initialization
void Start ()
{
	
}

// Update is called once per frame
void Update () 
{
	
}

void OnTriggerEnter2D(Collider2D other)
{
	if (other.tag == "Player") 
	{
		Application.LoadLevel(Application.loadedLevel);
	}
}

Thank you very much !

When the player get’s into contact with the enemy, there are some things that have to be checked and taken action upon

-If the player’s y-position is higher than the enemy’s y-position + a constant, destroy the enemy.

-Else destroy the player (and trigger other things like a game over screen for example).

So basically, I’d suggest doing something like this in the player OnTriggerEnter2D script:

void OnTriggerEnter2D(Collision2D enemy) {

  if(transform.position.y > enemy.position.y + 0.5f) {
    //Destroy enemy
    Destroy(enemy.transform.gameObject);
  } else {
    //Destroy player and do other stuff
    Destroy(gameObject);
  }

}