|Topic was automatically imported from the old Question2Answer platform.
Hi! I want to access a node using code. The scene root node (in this case a
Control node) has a script, called
Control_FS.gd, and I want to access some direct children nodes using the
$ operator, in this case:
extends Control onready var texture_button = $LeftButton func _process(delta): if texture_button.is_pressed(): ...
This worked fine when I ran the code in
LeftButton.gd, but I need to run it in
Control_FS.gd instead. I do not see where I am going wrong, but the code basically says that
$LeftButton does not exist.
Where is my problem?