This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

In my game i have a scene called "Level1". If player players dies i reload the same scene again with gettree().changescene("res://Level1.tscn") to make player replay the same level . Problem is everytime player dies the music resets and its kinda annoying. Is there a way to make stream_player dont reset while changing scenes.

Godot version 3.4
in Engine by (204 points)

1 Answer

+1 vote

The way I got that to work is I have a root scene that never changes and I added the music player to that scene. Every time I add a or change scene (Level1 in your case), I instance the scene and add it to the root, removing the old scene.

This way my root scene can have the music player, and the music won't stop when you change level scenes since the root scene will always exist.

by (1,468 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.