Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Telley |
I am trying to run a script to change the texture of one of my textured buttons (right now just in the ready function but eventually on signals); however, I keep getting the error message
Attempt to call function ‘set_normal_texture’ in base ‘null instance’ on a null instance.
Based on making small changes it seems like my code is not recognizing my Button1 , but I am not sure why.
extends CenterContainer
func _ready():
$Button1.set_normal_texture("res://Images/PeiceTile.png")
My nodes are a CenterContainer which containsHBoxContainer which contains Button1, Button2,…, Button 7.
Thank you in advance to anyone who is able to help me!