I have two scenes that have a button that when clicked runs the following code:
extends Button
#@export var transto: Resource
@export var transto: PackedScene
func _on_pressed():
get_tree().change_scene_to_file(transto.resource_path)
#get_tree().change_scene_to_packed(transto)
For each scene I dragged the other scene into the transto variable. The game works just fine if one scene had transto assigned and fails to load when both are.
For reference as to what I am trying to do, I am making a menu that can go from one menu to another and then back to the first menu.