Based on your scene tree, the
Label are siblings with a common parent (the
Node2D), right? And, the script you show is attached to the
In that case, your
$Label references in the script won't work (and should be generating errors when you run the game).
A references of
$Label will cause the engine to search for a control with that name as a child of the node containing the script (so, as a child of
Button). In this case, that node won't be found.
To find a sibling node, you need to reference it differently. This should work:
var cenoura = 0
onready var label = get_node("../Label")
label.text = "BATATA"
if cenoura == 1:
label.text = "CENOURA"
cenoura = 1