` I am getting this error and I feel like i’m trying to do a pretty straight forward replace/update the text of a label… I keep getting this error:
Invalid assignment of property or key ‘text’ with value of type ‘String’ on a base object of type ‘Label’.
func _on_button_pressed() → void:
var _sDice1 : String
_iDice1 = randi() % 6 + 1 # Random number between 1 and 6
_sDice1 = str(_iDice1)
Label.text = "Dice1 : %s" %_sDice1
Label is a class, and not a reference to a specific label.
If your Label is called Label that might be an issue, as GDScript might not know if you are trying to reference the class Label or a variable with the name Label.
Make sure your label’s reference is correct, and if it is, and it’s called Label, try to rename it to something else, such as: label or _label.