Did anyone manage to change text via code? I tried many ways they suggested but most of them don't work for godot 4. I also try label.modulate or set
red = Color(1.0,0.0,0.0,1.0)
set("theme_override_colors/font_color",red)
but they all warned "Invalid method on base Label". Here is my code:
@onready var status = $Label
func _on_ok_pressed():
if label.text == passWords:
status.text = "Correct"
else:
status.add_theme_color_override("font_color", Color(1, 0, 0))
status.text = "Try again"