How do I respawn more enemies after they've been hit?

In the game I'm currently working on, you're supposed to shoot at zombies to win. But I can't figure out how to code the zombies other than their movements. I want it so that when you hit them they despawn and once all are gone it goes to the next level which has more zombies. I haven't been able to find any tutorials or other help, so I thought I'd ask the forum. Thanks!

This sounds like the Mole Mash tutorial.

Have you done that one yet?

I looked at it but I wasn't exactly sure how to apply it to my code. I'll still try it though, just to make sure

A zombie is a mole mash hole that moves, and look either like a zombie or a dead zombie.

I was able to get it to work, thank you