A problemm witha a label

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Mora

I wrote this code
But it put that there is an invalid set index “text”

func _process(delta):
$Vidas.text = str(Mundo.Vidas)
But it put that

:bust_in_silhouette: Reply From: Inces

invalid set index text… and there must have been something else in that error. Like : on base null instance ??

If so, than Your node does not see $Vidas node, which means a path to it is incorrect , name is incorrect, or it is not a child of this calling node at all.

:bust_in_silhouette: Reply From: fagnerln

You need to specify what exactly is your error. This can mean a lot of things like this node don’t have a text property or don’t have a variable called text, or it doesn’t even exists for some reason.

And it’s a bad idea to change a name of a label on the _process function, this will be executed A LOT, for no reason.