Go factory help

HP can be a property of the game object, e.g. self.hp - this way you will create a separate self.hp for each instance of the enemy. This applies to every data to you want to be unique to each instance, not shared.

If you still want to store health points on enemies in a Lua table - you need to create a new entry for each enemy, e.g.

M.enemyHealth = {}
M.enemyHealth.enemy_value = 3

change to seomething like:

M.enemyHealth = {}
M.enemyHealth["instance1"] = 3
M.enemyHealth["instance2"] = 3

etc.