game.Players.PlayerAdded:Connect(function(plr) plr.CharacterAdded:connect(function(char) char:WaitForChild("Humanoid").Died:connect(function() print(plr.Name.." died!") if game.ReplicatedStorage.RandomMusic.Music1.Playing == true then game.ReplicatedStorage.RandomMusic.Music1:Stop() end if game.ReplicatedStorage.RandomMusic.Music2.Playing == true then game.ReplicatedStorage.RandomMusic.Music2:Stop() end if game.ReplicatedStorage.RandomMusic.Music3.Playing == true then game.ReplicatedStorage.RandomMusic.Music3:Stop() end if game.ReplicatedStorage.RandomMusic.Music4.Playing == true then game.ReplicatedStorage.RandomMusic.Music4:Stop() end if game.ReplicatedStorage.RandomMusic.Music5.Playing == true then game.ReplicatedStorage.RandomMusic.Music5:Stop() end end) end) end)
Use a local script like how I did with mine. Use this code and put in a sound in StarterGui, then insert a LocalScript. This is only if you die.If you reset, the music would start playing from the beginning.
local sound1= 884696085 local music=script.Parent local sound2= 214902446 local music=script.Parent local sound3= 225000651 local music=script.Parent local sound4= 1088486530 local music=script.Parent local sound5= 515864049 local music=script.Parent local sound5= 515864049 local music=script.Parent local sound6= 706817339 local music=script.Parent local sound7= 515864049 local music=script.Parent while true do wait() music.SoundId="rbxassetid://"..sound1 music:Play() music.Ended:Wait() wait() music.SoundId="rbxassetid://"..sound2 music:Play() music.Ended:Wait() wait() music.SoundId="rbxassetid://"..sound3 music:Play() music.Ended:Wait() wait() music.SoundId="rbxassetid://"..sound4 music:Play() music.Ended:Wait() wait() music.SoundId="rbxassetid://"..sound5 music:Play() music.Ended:Wait() wait() music.SoundId="rbxassetid://"..sound6 music:Play() music.Ended:Wait() wait() music.SoundId="rbxassetid://"..sound7 music:Play() music.Ended:Wait() end