|Topic was automatically imported from the old Question2Answer platform.
Hi I try to make a method globally that queue free the enemy and/or player when the life it’s 0. Problem is that i use an animated sprite with an area2d for player and enemies my script beeing attached to the sprite. The method is this:
but when the ememy need to die i get this:
Attempt to call function ‘queue_free’ in base ‘null instance’ on a
what I’m thinking is that area is just null or it became null after they collide but I don’t know how to take a reference of what hits the enemy? Any idea