Godot Version
4.3
Question
Im trying to change my label’s text through scripts but it keeps crashing when i run it. Heres the code.
Blockquote
Extends label
func _process(delta: float) → void:
self.text = Global.health
Godot Version
4.3
Question
Im trying to change my label’s text through scripts but it keeps crashing when i run it. Heres the code.
Blockquote
Extends label
func _process(delta: float) → void:
self.text = Global.health
we need to convert int or float numbers to string with str() function
self.text = str(Global.health)
It works, thanks
You’r welcome