I would like to create a score counter to my game through a label
here is my code:
extends Label
var score = 0
func _process(delta):
score += 1
get_node("HBoxContainer/score_number ").text = str(score)
but it wont work and gives me an error:
Invalid set index 'text' (on base: 'null instance') with value of type 'String'.
thanks in advance!