Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do i insert music into my game and make it loop?

Asked by 9 years ago

Hi everyone,

How do i insert music into my game and make it loop without anybody having to click a GUI or button?

3 answers

Log in to vote
0
Answered by 9 years ago

Put this script into WORKSPACE

game.Players.PlayerAdded:connect(function(Plr)
local s=Instance.new("Sound",Plr:FindFirstChild("PlayerGui")) --This inserts a "Sound into there Gui
s.Looped=true --This loops it
s.Volume=1 --Changes the Volume
s.SoundId=("rbxassetid://175352011") --Sets the Asset you want to Play()
s:Play()
end)
0
I tested it in my studio and it works just fine. MessorAdmin 598 — 9y
Ad
Log in to vote
0
Answered by 9 years ago

Simple. Add a Sound object into the StarterGui, add a SoundId, press the "Looped" button, and then add this script in it (LocalScript):

if game.Players.LocalPlayer then
script.Parent:play()
end
Log in to vote
0
Answered by 9 years ago

Thank you ^-^

Answer this question