I can see it if the script isn’t attached to a node. If it is, it’s like being on a branch, asking for a tree, and getting an answer there is no tree. Apparently my metaphor isn’t working.
Please check the documentation to understand the way this works instead, this is not the place, OP needs help with an issue and this isn’t the place to teach you how this works (your metaphor is wrong)
Do you queue free or end current scene prior to this?
This process call could happen later than you expect. Possibly the next frame after you have run the rest of your game finished code which we dont know what it does.
Just call it by a signal emitted or a function call done when you have achieved what you want. Then you know exactly when it will happen.
No but i meant that the check that runs in process could have passed already, then turned to true after already giving the results for a false for the current frame and finally get set up to check next frame durikg process. Putting some of tte code to wait around in process while other parts run instantly could be the problem.
It wouldn’t work that way, if we are awaiting then the callback wouldn’t happen as the object is deleted (when freeing a node all signal connections to it are cleared, so the callback won’t happen), so it’s more likely it was removed from the tree but not freed if that’s the case
But queue free is not the cause here I’d say, unless for some reason there’s some await on a signal on another thread that causes that, but that seems very unlikely
Either way the main point is that there seems to be some kind of out of sync behavior from splitting the code up in a weird way. Queue_free() being the exact function called or not called doesn’t matter as much to me as trying to get the code to run when it needs to and not let it wait around until the next process call while other things continue running, changing the things around so that when eventually the change scene runs, it causes the game to break.
First step would be to remove process entirely from the change scene logic and let the things run in the order they need to run.