An object's double is not destroyed

I made a code to destroy a target when it collides with a projectile
However, once one target is destroyed, other copies of the same object will not be destroyed by the projectile

My code (note: bolinha is the name of the projectile):
func _on_collision_body_entered(body):
if body.get_name() == “bolinha”:
queue_free()

Object copies aren’t linked like this, you would have to add your own functionality for this, like using a group

Or do you mean it works only once? That depends on how you’ve set it up, would need some more information on where you’ve got this signal set up

Also the projectile might be given a different name if more are fired

I’ll explplain a little better
I have a target, it is programmed to be destroyed when a projectile hits it:


I put 2 copies of this target on a scene:
image
When I shot a projectile on a target, it will work on the first target that I shoot, but it won’t on the second

I’ll explplain a little better
I have a target, it is programmed to be destroyed when a projectile hits it:


I put 2 copies of this target on a scene:
image
When I shot a projectile on a target, it will work on the first target that I shoot, but it won’t on the second
Additionaly, testing I discovered that if I destroy my enemy, the target can’t be destroyed and vice-versa
So in essesncd, my bullet can only destroy one object

Do you remove the bullet after hitting? Do you fire multiple bullets?

If the bullet is still there when you fire a second it will be named “bolinha1” instead, and then “bolinha2”, so you should probably use some other way to tell if it’s a bullet