To fix your issue there is a few functions you can use with the audio player to resume the music exactly where you want it to.
First, you need to get where your music will stop at when you transition scenes
var music_time = get_position_playback() #returns the amount (in seconds) of where the audiostream is at
You can then use another function to resume the play of the music at a specified position.
$AudioStreamPlayer.play(music_time) # will resume the music at the value of music_time
And I repeat from my earlier comment, don't autoload the script for your titlescreen, create a new script, autoload that and hold the music_time variable in that script so you could call on it between scenes.
For example: You have a script named Global.gd autoloaded and there is a single statement in the script var music_time
, to call on it you would write this statement before you transition scenes:
Global.music_time = get_position_playback()
Then in your other script for the scene you transition to you would write:
if Global.music_time != null: # check to make sure you don't get an error
$AudioStreamPlayer.play(Global.music_time)
else:
$AudioStreamPlayer.play() #starts music from beginning