Mute/Unmute music starts over when I die


So I’ve got a Mute/Unmute GUI in music, which simply shuts on/off song only for you, not server.

However, when I die, the GUI automatically sets to ‘Mute Music’, which means that music is on and it turns on by itself.

How can I prevent it from setting itself on when someone resets/dies?

Select the GUI, and toggle “reset GUI on respawn” option to false.

1 Like

When a Player dies any Client Scripts run again and Gui’s reset. You can select ‘Reset on spawn’ to be off in the Gui properties (like @phSalami said) also you might want to make an if statement in your Client Script to check if its the players first time loading so that the music doesn’t play again if your playing it to begin with.

1 Like

Something to clarify: client-side scripts reset only when in a resetting container (PlayerGui and Backpack). They do not from PlayerScripts.

1 Like