Hi everyone,
How do i insert music into my game and make it loop without anybody having to click a GUI or button?
Hi everyone,
How do i insert music into my game and make it loop without anybody having to click a GUI or button?
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)
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
Thank you ^-^
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
I tested it in my studio and it works just fine.