From eb791059cd6aa6e7f92dd9467a11e8ea561334d1 Mon Sep 17 00:00:00 2001 From: LUCASTUCIOUS Date: Wed, 24 Jul 2024 23:43:32 +0200 Subject: [PATCH] fix erreur --- core/sceneInstance.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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())