If you can...Plz help me to make global music in all scenes
Now I have
extends Control
# Load the music player node
onready var _player = $AudioStreamPlayer
# Calling this function will load the given track, and play it
func play(track_url : String):
var track = load(track_url)
_player.stream = track
_player.play()
# Calling this function will stop the music
func stop():
_player.stop()
But code shows me
Invalid set index 'stream' (on base: 'null instance') with value of type 'AudioStreamOGGVorbis'
On other scene I summon my PLAY function
Music.play("res://SFX/zvuki-signal-trevogi.ogg")