Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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

✓ Accepted answer

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)

1 comment

0

I tested it in my studio and it works just fine.

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

This discussion is preserved as it was. New answers, comments, and votes are closed.