Im making this underground music player like a club bunker, and i have added invisible parts covering the enterance and the area. I have a folder with 3 different parts, one at the main entrance playing low audio and area 2 with medium and area 3 which is the club area. I made this script with skip and mute button. The trouble is on line 5 I can't get all of the childrens sound in the folder becuase I don't have a clue yet. The model in line 5 is 3 parts called area with sound parented in it.
local Songs = {
1876360209,6888740313,786465393,6415424340
}
local SongObject = script.Parent.Folder.Model:GetChildren()
local SkipButton = script.Parent.ProximityPrompt
local MuteButton = script.Parent.Mute.ProximityPrompt
MuteButton.Triggered:Connect(function()
if SongObject.Volume == 4 then
SongObject.Volume = 0
MuteButton.ActionText = "Unmute"
else
SongObject.Volume = 4
MuteButton.ActionText = "Mute"
end
end)
SkipButton.Triggered:Connect(function()
SongObject:Stop()
end)
while true do
for i = 1, #Songs do
local Song = Songs[i]
SongObject.SoundId = "rbxassetid://" .. Song
SongObject:Play()
repeat wait() until not SongObject.IsPlaying
end
end

1 comment
Im xonfused on wht ur trying to do, r u trying to play music in the part? Does the aound already exist?