One of the things that had me scratching my head about Godot was sharing information easily between scenes. For example, if the player is in one scene (the overworld) and wants to move inside a building, I still want to retain the player’s stats, inventory etc.
One easy way to do this is with a global script – Singleton.
Create a script that extends from Node, call it global(or whatever you want) and add it to the AutoLoad screen in Project Settings. On startup of your game, this script will be loaded. This is especially useful for changing scenes without need of some larger overarching scene in the game.
The above image shows an example global script along with the means to switching between scenes. (official reference). Essentially, these functions to change scene can be accessed from any node. So for a title screen, you can attach a script to a node to call “goto_scene” to switch to your first level scene. It also is executed in a way that will wait for any processing on the current scene to finish before destroying and then loading the new, desired scene.
All the member variables will also be accssable, ie “PlayerDirection”