Topic was automatically imported from the old Question2Answer platform.
Asked By
MarcoAAG
Hi I want to add a TouchScreenButton in my code, this is my code
var StartBtn = TouchScreenButton.new()
get_parent().add_child(StartBtn)
var normal_btn = preload("res://Load/startBtn.png")
StartBtn.normal.set_texture(normal_btn)
when i run this i got an issue
Attempt to call funtion ‘set_texture’ in base ‘null instance’ on a null instance, how can i solve it?