I have an enemy that has a visible health bar that shows how much health it has left. but i don't know how to give a health bar to each enemy separately.
If you add the enemy and health bar to a 'container', when you create an enemy it will have its own health bar. Events will also work to relate the health bar to the enemy such as set bar.health to enemy.health
Develop games in your browser. Powerful, performant & highly capable.
I built this example for a different forum question but it makes use of the caontainer as lionz said. Take a look.
drive.google.com/file/d/1vObtjdJppTivblySf-rn0Vx4bUH2fYTn/view