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.
You're using a while loop which can be your problem. Not entirely sure if this is what you'e trying to do but
T = 5 --Time before music starts again while wait(T) do music:Play() --stoof music:stop() end