Advertisement
Diamond32_Tutoriales

Auto Reproductor de musica

Feb 15th, 2021
1,057
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.49 KB | None | 0 0
  1. --TYPE SCRIPT
  2.  
  3. MusicPlayerInstantiate = Instance.new("Sound")
  4. MusicPlayerInstantiate.Parent = game.Workspace
  5. MusicPlayerInstantiate.Name = "Music"
  6.  
  7.  
  8. urlAPI = "http://www.roblox.com/asset/?id="
  9.  
  10.  
  11. IdSounds = {"3291366970", "2578125671"}
  12.  
  13.  
  14. local MusicPlayer = Workspace:WaitForChild("Music")
  15.  
  16. while true do
  17.     MusicPlayer.SoundId = urlAPI .. IdSounds[math.random(1, #IdSounds)]
  18.     MusicPlayer:Play()
  19.  
  20.     print("Duracion " .. MusicPlayer.TimeLength)
  21.    
  22.     wait(MusicPlayer.TimeLength)
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement