Godot Version
4.2.2 stable
Question
I am having an odd problem. I have some code from a tutorial that shows a message when the player approaches the object. This uses a label to display the text and that works.
I wanted to change the label to a button, so I copied everything into new files and changed the label to a button. The problem is that I get an error when I try to run it.
Attempt to call function ‘hide’ in base ‘null instance’ on null instance.
I put the same reference that existed for the label in the code.
@onready var label = $Label
@onready var action_button = $ActionButton
then i show hide it based on a condition
action_button.show()
action_button.hide()
What am I doing wrong?
Thanks