Enemy takes no damage

Seems like you are subtracting nine health, and separately checking if their health is zero. I recommend making this an if statement and using less than or equal to zero, since negative numbers would not trigger an equal comparison.

elif _area.is_in_group(“bala”):
    vida -= 9
    if vida <= 0:
        queue_free()

Make sure to format your code correctly, it’s hard to read without formatting.

1 Like