this is been driving me crazy, and i have a script that plays music in the background. The annoying part is it restarts whenever they player dies. Is there a fix for this?
script.Parent:WaitForChild("Sound5"):Play()
script.Parent.Sound1.Ended:Connect(function()
script.Parent.Sound1:Stop()
script.Parent.Sound2:Play()
end)
script.Parent.Sound2.Ended:Connect(function()
script.Parent.Sound2:Stop()
script.Parent.Sound3:Play()
end)
script.Parent.Sound3.Ended:Connect(function()
script.Parent.Sound3:Stop()
script.Parent.Sound4:Play()
end)
script.Parent.Sound4.Ended:Connect(function()
script.Parent.Sound4:Stop()
script.Parent.Sound5:Play()
end)
script.Parent.Sound5.Ended:Connect(function()
script.Parent.Sound5:Stop()
script.Parent.Sound1:Play()
end)

5 comments
They can't just reset when they die, they are most likely placed in the Backpack, PlayerGui, or Character.
assuming you want the music to be for that client only, you could put them in a gui and then set ResetOnSpawn to false
I'm assuming this script is in a local-script. You could always try puttting it in a server script so it doesn't stop and it plays at the same time for all players I think.
Workspace / SoundService should work fine.
oh yeah putting it inside a gui worked thanks i feel kinda stupid now