HowToRoblox

MusicPicker

Apr 3rd, 2021 (edited)
5,048
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.32 KB | None | 0 0
  1. local currentSound = workspace:WaitForChild("CurrentMusic")
  2.  
  3. local songs = script:GetChildren()
  4.  
  5.  
  6. while true do
  7.    
  8.     for i, song in pairs(songs) do
  9.        
  10.         local id = song.Value
  11.        
  12.         currentSound.SoundId = id
  13.        
  14.         currentSound:Play()
  15.        
  16.         wait(1)
  17.         wait(currentSound.TimeLength / currentSound.PlaybackSpeed)
  18.     end
  19. end
Add Comment
Please, Sign In to add comment