Turning on the music when moving to the scene. Godot 3

Godot 3.5

I have a button, when it is pressed, the transition to another scene where music should play in the audiostreamplayer, but how do I make music from another scene start playing at the same time when the button is pressed and the transition of the scene is performed?

If you’re using the change_scene_to_file function, the AudioStreamPlayer can’t be a part of the scene (since it would be removed then as well). You can use a Singleton for this. Alternatively, stop using change_scene_to_file, and write your own function that only swaps out some parts of the current scene.