You’re trying to reference siblings of this Node by using the syntax for children, and you’re using incorrect names - the name has to be exact to work properly.
E.g. the “burger” node should be $"../Burger" instead of $burger
I would also say it’s better to use @export var sytax than @onready var, it gives you better control over which Nodes you are referencing. But this is just a preference thing in the end.
It didnt work when I used $“…/burger”. it said the exact same thing when I used $burger and I don’t know how @export works like when I used it there were lots of errors. Could you show me how the correct line of code would look like?
Seems like you should attach this script to the start screen’s root node instead of the play button. You can still connect the pressed signal to this script.
I don’t know which Nodes you want to assign to grease_counter, click_multipler_button or click_sound_effect variables, because nodes of these types don’t exist in the current scene. If you want to reference Nodes in the MainGame scene, maybe this script (at least part of it) should be somewhere on the MainGame scene instead of the StartingScene?
It’s kinda confusing how you’re referencing your Nodes all over the place.
Well, this is the click_button.gd script and it’s referenced only within the starting_screen.tscn, not the main_game.tscn. Maybe you mixed up your button scripts.