Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- 26/1/2019 by Valualty --
- tab = {}
- function getaudios(p)
- for i,v in pairs(p:GetChildren()) do
- if v:IsA("Sound") then
- if v.TimeLength >= 20 then
- table.insert(tab,v)
- end
- end
- getaudios(v)
- end
- end
- getaudios(workspace) -- collect all the songs
- for i,v in pairs(tab) do -- stop all songs
- v:Stop()
- end
- for i = 1, #tab do -- preview each songs for 2 seconds
- if i > 1 then -- stops the previous song
- tab[i-1]:Stop()
- end
- tab[i].TimePosition = tab[i].TimeLength/2
- tab[i]:Play()
- print(tab[i].Name.." ".. tab[i].SoundId)
- wait(2)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement