![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | redstonecreeper8 |
I have a player character that I want to be able to seamlessly transition between different scenes. The way I tried to do this was by using an autoload script. There was a variable “player” that stored the player node, and whenever the player passes a certain location, the autoload changes the scene and adds the player variable to the new scene root using add_child(). However, whenever this function runs the game instantly crashes with no error message. I can post a gif of what happens with my specific code if that helps. Thanks in advance!
Edit: I have found out my problem is due to the player variable becoming “Deleted Object” when I change scenes. This is because the variable is pointing to a specific node in a specific scene. So what I want to know, is how can I “save” the player node as a scene that I can instance in the next scene? Thanks!