Hi,I have been trying to make a game and along the process I have encountered a bug. Its when an enemy's health (instance variable) < or = to 0 Enemy Destroy than, add 5 to score. The code is in the attachment below.

You do not have the required permissions to view the files attached to this post.

This is the wrong section BTW. You should really post this in the 'How Do I' section.Have you used debug to see what value(s) health is holding? It may not be a whole number, due to the way computers calculate numbers, so using one of the usual expressions may help, such as round, Int etc.

If your vision so exceeds your ability, then look to something closer.

@zenox98 I will remember that topics like this are supposed to go in the 'How Do I' section. Health holds 10 health than it goes down to five than zero and than bot instances are destroyed. It remains a whole number no matter how the player hits the enemy. What do you mean

Still you need either to replicate the issue in a new capx if you don't want to publish the current capx, or just go and post your capx so we can investigate it further.There is nothing wrong with the few lines of code you've shown so far and we can't guess how you made your project.

If you fear people stealing your project, don't fear.It's not working as intended at the moment anyway, so there's nothing to steal.