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