Why [Object:null]???

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By DiZu

cannot connect to button’s signals, cause error “Object NULL” - Why?
Screen from GD Engine

extends LineEdit
    
onready var But = $Camera2D/Button

func _ready():
	var m = self.text
	var But = $Camera2D/Button
	print(But) #[Object:null]
	But.connect("button_down", self, "_g")

func _g(text):
	print(self.text)
:bust_in_silhouette: Reply From: SteveSmith

It’s because $Camera2D/Button doesn’t exist.

Start typing “$Cam”…, and then see what the auto-complete brings up.