So, I have this script that plays music, It kinda looks like this: (Simplifying it a bit)
while wait() do
script.Parent.sound:Play()
-- Do some stuff
script.Parent.sound:Stop()
end
The sound plays all well and good, but, If the player dies in during the "Do some stuff" time, the music keeps playing. It doesn't stop. Any way to stop sounds form playing when the player dies?\
EDIT: On request of what I want the script to do: I have a timer that, when the timer starts plays some music, and when it ends, stops. The player can die within that time.

1 comment
What are you trying to accomplish with the script??