Hello, I have a small problem that I don't know how to solve:
I have a parent node that I remove from the tree in the ready() function, I have assigned some of its children a code that causes them to be removed with queuefree(), the problem is that the code removes the child nodes correctly, but when adding the node back to the main tree with addchild gives me an error, node not found, which refers to those that were previously removed. In the application itself it does not give any problem and I imagine that it is because it eliminates the child nodes when it is not in the tree.
Is there a way to read the children's script first and remove them and then pass to the parent's script to detach it from the tree?