i dont have any clue what to do right now
plz just give me a starter script in gd script version 4.5
wchc
2
Here you go:
extends Button
var score: int = 0
func _ready() -> void:
pressed.connect(_on_pressed)
_update_text()
func _on_pressed() -> void:
score += 1
_update_text()
func _update_text() -> void:
text = "score: %s" % score
But I suggest you to go through some basic tutorials like these:
3 Likes