i am trying to update the text of a label but keep getting the above error message. i don't know what i am doing wrong. here is my code:
extends Node
var PlayerScore = 0
var EnemyScore = 0
func _on_Left_body_entered(body):
$Ball.position = Vector2(640,360)
EnemyScore += 1
func _on_Right_body_entered(body):
$Ball.position = Vector2(640,360)
PlayerScore += 1
func _process(delta):
$PlayerScore.text = str(PlayerScore)
$EnemyScore.text = str(EnemyScore)