I created this so the players could listen to music for a game I made but when the player dies.... The music stops. Probably due to the fact that the whole player was reset and the fact that the playergui area was reset so the music does not exist. Is there anyway to make this work when the player dies as well?
game.Players.PlayerAdded:connect(function(player)
wait(1)
local sound = Instance.new("Sound")
sound.SoundId = "http://www.roblox.com/asset/?id=300733201"
sound.Parent = player.PlayerGui
sound:Play()
sound.Looped = true
wait(70)
sound.Looped = false
local sound = Instance.new("Sound")
sound.SoundId = "http://www.roblox.com/asset/?id=170691997"
sound.Parent = player.PlayerGui
sound:Play()
sound.Looped = true
wait(50)
sound.Looped = false
local sound = Instance.new("Sound")
sound.SoundId = "http://www.roblox.com/asset/?id=262085924"
sound.Parent = player.PlayerGui
sound:Play()
sound.Looped = true
end)
