godot throws an error every frame, even though the code works perfectly

im using godot version4.6

so im making a pong game, and the label that handles the point count(it retrieves the point number from a autoload global script), throws an error every frame, even though it updates and works correctly (i dont know if it matters but im using a custom richtextlabel from a plugin that autoscales)

heres the code:

@tool
extends AutoSizeRichTextLabel
@onready var points = PointHolder.left_points

func _process(_delta: float) -> void:
	var points = PointHolder.left_points
	text = str(points)

Why is this a @tool script?

cuz if i dont put it throws a warning, as i said, im using a custom node from a plugin

And what’s that warning?

@tool scripts run inside the editor, I don’t see why your labels would need that. And trying to access the autload inside the editor seems to cause the errors from your screenshot.

It might be better to use signals for this as opposed to checking every frame in process for updates. You only need to update the labels when points are scored after all.

Will that fix your error, maybe not, but it might lead you to the root cause by going through it.

That is not the code throwing the error. It’s the PointHolder script throwing the error.