Help with null instance error

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

(Sorry for my english i’m using google translator)
I had a problem that when I loaded the script into autoload, then in the connect function I started to get an error: Attemp to call function ‘connect’ in base ‘null instance’ on a null instance

onready var console = $Console

func _ready():
    console.connect('text_entered', self, 'console')
:bust_in_silhouette: Reply From: Dlean Jeans

I think you probably need to load the .tscn scene file into AutoLoad instead, not the .gd script file.