So heres what i tried [I'm not very good at scripting] Trial #1 game.workspace.Players.LocalPlayer if health = 0 then wait (0.1) game.workspace.Audio1.play
Trial #2 game.workspace.Players.LocalPlayer Health=H If H = 0 then wait(0.1) game.workspace.Audio1.sound
game:GetService('Players').PlayerAdded:connect(function(plr) plr.CharacterAdded:connect(function(plr2) plr2:WaitForChild("Humanoid").Died:connect(function() game.Workspace.YourAudio:play() end) end) end)
That should work. It just checks if the Humanoid has died and if it does it plays the music.
Nice attempt. I just grabbed this script from the Wiki's page on the Died event
game:GetService('Players').PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) character:WaitForChild("Humanoid").Died:connect(function() game.Workspace.Audio1:Play() end) end) end)