Hi, I have a problem with the spawner counter on a project that i work.
var sprite=load("res://Scene/Sprite.tscn")
var counter = 0
func _on_Button_pressed():
var spawn = sprite.instance()
add_child(spawn)
counter =+1
$Label.text = str(counter)
To be short it only show 1 and it get stuck there regardless how much I press the button. Any ideea?
P.S. Thanks in advance and sorry for bad english