load scene in godot code example
Example 1: changing scenes in godot
get_tree().change_scene("res://pathtoscene")
Example 2: change scene godot
get_tree().change_scene(scene_to_load)
get_tree().change_scene("res://pathtoscene")
get_tree().change_scene(scene_to_load)