in my score script I'm getting the Invalid set index 'text' (on base: 'null instance') with value of type 'String'." on the line where I'm setting my text $score.text = str(score)
extends Control
var winscore: int = 50
var superwin: int = 100
var score: int = 0
func _ready():
Signals.connect("on_score_increment", self, "_on_score_increment")
func _on_score_increment(amount:int):
score += amount
$score.text = str(score)
I'm confused as it was working fine a few moments ago, and the game jam I'm entering ends in a few hours. Any help is welcome, thank you!