Destroying enemy by bouncing above

Hello Everyone!
I’m making a 2D platformer and I want my player to destroy the enemy by making the player bounce on it. But when it jumps over the enemy , it won’t destroy the enem and the player gets stuck above the enemy.
There’s no error in code as I’ve checked it twice. I’ve added two box colliders to the green wiggle and also a circle collider to it.
Any help will be greatly appreciated!alt text
Here’s the image:

Set the enemy’s collider to a trigger and on a OnTriggerEnter2D function work out if the player is above the enemy. If it is, kill the enemy. If it’s not kill the player.



Here’s the documentation: [2]: Unity - Scripting API: MonoBehaviour.OnTriggerEnter2D(Collider2D)

Hey Sean!
I’ve made it trigger but nothing changes. The situation is just the same:(

Much better to use raycasts, I made a mario clone and what I found was the box collider system was very inconsistent when detecting collisions.