In the enemy script:

For an Enemy to take damage it needs:

a max_health variable

a way to set (update) the current health

to delete the enemy if health drops to 0

To set the current health to the max health in the ready function