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

  • xyz replied to this.
  • 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.

    foxycodes Check that Cps actually exists in the scene and that is set as a scene unique node i.e. must have the symbol % before its name in the scene tree.

      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.