Jump on Enemy heads to destroy enemy?

I have a little problem with collision. I made a script to destroy enemies on collision, and when I collide with the enemy by moving forward, it is destroyed. But when jump on the head of the enemy, it does not destroy, but rather, my player will be on the head of the enemy.

Is there a way for me to destroy enemies by jumping on their heads? Something just like Super Mario Bros where Mario can jump on enemies and they are destroyed but when he collides with an enemy, he loses health or a life.

Yes. It is actually very easy. I assume that you already are using a “Is Trigger” collider, and using an OnTriggerEnter() function on a script. All you have to do for them to die when jumping on their heads is to have the “Is Trigger” SphereCollider located at the head of your enemy, not the whole body like you have now.