Now we are going somewhere...
That Label
is on ready function scope, you want it outside (an instance variable).
Also, it points to the root node of the preloaded scene, if it does not have a function gettext, will throw an error.
Now depends on what are you doing, if you plan to add to the tree the instance Label
, you will get the text (unless a _ready in Label
does something to it).
If you change scenes to get the text on a new main scene, you may lose reference to Label, the way to solve that could be a singleton used to store the text (like passing a score from game to menu).
Tutorial for singletons is here:
http://docs.godotengine.org/en/stable/tutorials/step_by_step/singletons_autoload.html
ps: You may need to follow some tutorials based on GDScript programming (or maybe python, is similar) because looks like you are not familiarized with basics like variable scopes.