DontBlinkDrWho

Untitled

Jul 19th, 2017
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.66 KB | None | 0 0
  1.  
  2. function Audio(id) --Turn it into a function, so you can call it later.
  3. local player = game:GetService("Players").LocalPlayer
  4. local sound = Instance.new("Sound") --Create the sound
  5. sound.Parent = player.Character --Where the sound is located (It will show as game.Workspace.Name.Sound
  6. sound.SoundId = "rbxassetid://"..id --The numbers are the id
  7. sound.Volume = 2.5 --Volume; Default is 0.5; Max is 10
  8. sound:Play() --You can use sound.Playing = true, or you can do this
  9. sound.Looped = true --It will play again once it is done
  10. sound.PlayOnRemove = true --If someone deletes the sound, it will keep playing.
  11.  
  12. end
  13.  
  14. Audio(123456) --Would play the audio with ID 123456
Advertisement
Add Comment
Please, Sign In to add comment