Godot Version
4.2
Question
I have created the line to edit a label’s text with a global variable max_health, but when attempting to run this script I end up with the error “Invalid set index ‘text’ (on base: ’ Label’) with value of type ‘int’”. I have been attempting to get this to work for close to two hours now lol
extends VBoxContainer
# Called when the node enters the scene tree for the first time.
func _ready():
$HPPoints/HPInfo.text = global.max_health
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass