I have a script that randomly picks a song and plays it, if I do the same thing and add :Stop() it will just randomly pick a song to stop. How could I get all running sounds and stop them?
✓ ANSWER ACCEPTED
How would I stop all playing sounds?
1 answer
✓ Accepted answer
group the songs together in a table. Use a for statement. Make them all stop.
local songs = script.Parent.Songs:GetChildren()
for _,u in ipairs(songs) do
if u.ClassName == "Sound" then
u:stop()
end
end
This discussion is preserved as it was. New answers, comments, and votes are closed.
