So I am new to game development and I was trying to make a simple clicker game and my label wont update. This code is written in the script of the label I want to update. I could not find this on the forums so I thought I would ask.
extends Label
export var cash : int = 1
func _on_Button_button_down():
cash += 1
print(cash)
func _ready():
self.text = "$ " + str(cash)
There may be something wrong with this code but I really don't know and it would be a great help if someone could help me solve this.
Thanks in advance!