whywhywhywhyyy
Yeah many problems with this. Calm down, get a Snickers or something.
You are coding it wrong, plain and simple, I don't know where to start.
1 - your script extends button, so it should be on a button and nothing else.
2 - the script you show uses a path that should go from adventure, but it's not adventure, so the path will of course fail.
3 - the $
method is get_node
, it should only be used for local nodes. For interacting between scenes you have exports, groups and autoloads.
% is also local, it's used on the main scene and nowhere else, I don't use it, I use groups and autoloads instead.
4 - when connecting a signal, you have to pass a callable
, a function without the ()
. Adding the ()
makes it run, so you are passing the return of the function which is void, so it receives null instead of a callable.