So I got an script inside _process(delta) that sets the %score to specific text( %Score.text = "Clicks: " + str(clicks) ). It works but when I copy that part and replace it with another it gives me this error Invalid set index 'text' (on base: 'null instance') with value of type 'String'.
I dont know where is the error the copied part stay the same I just switch the %score to %Cps and it just doesnt want to work. Can anyone help. Thanks
Text set error
foxycodes Accessing a scene unique node via its name only works inside the same scene. It's listed under limitations in the docs section about unique nodes
- Best Answerset by foxycodes
foxycodes for creating a new reference to a node
, click on the node and drag it to your script. this will create a local reference to your node with the $
symbol.
the %
is reserved for unique nodes and should not be used too often.
for setting a reference to a node outside the scene, use an @export
and set it manually, because node names can change and nodes can be destroyed during game.