How do I delete a specific instance

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

I am trying to delete a specific named child node ex. enemy.name = str(id) and this enemy is stored in an empty node named enemies. How do I delete the specific enemy. I know how to use the queue free, but do not fully understand how to use get_child and get_tree functions

:bust_in_silhouette: Reply From: strangerturtle

I figured out how to do it by doing enemies.get_node(str(id)).queue_free()