Godot Version
Godot 4.3 Stable
Question
I have this occasional error on either the get.tree().create_timer or change_scene_to_file function that says the scene is null. These are called after updating global/autoload variables to update the game
Blockquote Global.unlock_level = 2
Global.SceneSelect = 2
Global.Add_Money()
Global.Save(“file1”)
await get_tree().create_timer(0.1).timeout
get_tree().change_scene_to_file(“res://Prelude.tscn”)
Despite it being a handful of variables, the timer and scene change works on most levels. But updating these global variables still randomly nullify the scene. I have even used the call deferred function on this. Is there a more optimal way to resolve this?