Team_Alex

Untitled

Jan 19th, 2020
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. sounds = {}
  2.  
  3. function getSounds(loc)
  4. if loc:IsA("Sound") then
  5. table.insert(sounds,loc)
  6. end
  7. for _,obj in pairs(loc:GetChildren()) do
  8. getSounds(obj)
  9. end
  10. end
  11.  
  12. getSounds(game)
  13.  
  14. game.DescendantAdded:connect(function(obj)
  15. if obj:IsA("Sound") then
  16. table.insert(sounds,obj)
  17. end
  18. end)
  19.  
  20. while wait(0.2) do
  21. for _,sound in pairs(sounds) do
  22. pcall(function()
  23. sound:Play()
  24. end)
  25. end
  26. end
Add Comment
Please, Sign In to add comment