Remove a clone?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Schweini

So, I cloned a Fish Sprite with this code:
var Fish = Fish1.instance() FishClone = add_child(Fish)
How can I let the clone(s) disappear?

:bust_in_silhouette: Reply From: Jowan-Spooner

Hey Schweinl,
you could do it inside the script of your fish. Deleting a nod is done with queue_free(). You can do the same from everywhere else too, in case your fish doesn’t have a script.

But your code looks strange. You are probably not doing FishClone = add_child(Fish). At least there is no sense in it. add_child() returns nothing so FishClone is empty.

Hope it helps.