Child node not found in a singleton

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

I only have a control node thats autoloaded and a audioplayer as a child node, but I keep getting an node not found error for the audioplayer node. Am i missing something, isnt it supposed to load from start?

Include the singleton setup and the code you’re using to try and access it. It’s hard to tell you what’s wrong without knowing what you have.

kidscancode | 2019-01-08 16:47

the autoload setup is default, haven’t touched anything besides the confirm. shows up as globals as name, res://globals/globals.gd as path and enable is checked under singleton

im trying to access it with this inside the globals script. the music node is under the globals node. the globals node is a control node and the music node is an audiostreamplayer2d
var song
song = load(“res://assets/213.wav”)
$music.set_stream(song)
$music.play()

poopfeast420 | 2019-01-08 17:11

:bust_in_silhouette: Reply From: poopfeast420

So I’m not sure about the difference yet but it was because I had the script autoloaded, not the scene, but the script autoloads with the scene so it seems like I’d always have to use the scene as a singleton, not the script?