diff --git a/core/sceneInstance.gd b/core/sceneInstance.gd index c4a16af..e61b1ff 100644 --- a/core/sceneInstance.gd +++ b/core/sceneInstance.gd @@ -9,7 +9,7 @@ var player func transition_to_scene(new_scene: PackedScene, spawn_location = Vector2(0,0), spawn_direction = 1): #screen_transition.play('FadeToBlack') - if(current_scene.get_child(0)): + if(current_scene.get_child_count() > 0 and current_scene.get_child(0)): current_scene.get_child(0).queue_free() current_scene.add_child(new_scene.instantiate())