Advertisement
TheNotePad_Scripter

Audio Player [ UPDATED ]

Mar 26th, 2023 (edited)
996
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.75 KB | None | 0 0
  1. -- This script is getting pretty popular, Want more? --
  2. -- Another script will be uploaded if we reach 450 views! --
  3. -- Audio used by in-game sources isn't working right now. Sorry! --
  4.  
  5. -- Configuration --
  6. local audioId = 9125402178 -- The Audio ID
  7. local Speed = 1 -- The audio speed
  8. local Looped = false -- If it's true, the audio loops. If not, the audio plays once
  9. local Parent = game.Workspace -- Create the audio in a location of your choice.
  10.  
  11. -- ! Do not change this ! --
  12. local audioSource = Instance.new("Sound")
  13. audioSource.SoundId = "rbxassetid://"..tostring(audioId)
  14. audioSource.Parent = Parent
  15. audioSource.PlaybackSpeed = Speed -- set the speed to 1.5
  16. audioSource.Looped = Looped -- set loop to true
  17. audioSource:Play() -- play the audio
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement