Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I make all audios stop on the players death?

I'm trying to figure out the script for when the player is dead, ALL sounds in-game are paused/stopped. I'm a terrible scripter, so be gentle :)

1 answer

there is two functions to stop or to pause an audio lets say there is a varable named "Song" which equals your audio, you would do (song:Pause) which stops the audio but when you resume it, it will resume where it was paused or (song:Stop) which stops the audio but when you resume it, it will start from the beginning

the event below detects if a player has died and fires everything in the event function

game.Players.LocalPlayer.Character.Humanoid.Died:Connect(function()
	--everything in here will fire when someone dies
end)

but I have a question, when you want all audio to stop. Do you want the audio in the server to stop, or the audio in the client to stop?

This discussion is preserved as it was. New answers, comments, and votes are closed.