A (possibly outdated?) GUI I have used to play music from a playlist. Recently the script hasn't been functioning(as in music does not play) and I'm not quite sure why. Script for the GUI:
local CurrentSong = script:WaitForChild("CurrentSong")
local Playlist = script:WaitForChild("Playlist")
local gui = script.Parent
local MainFrame = script.Parent.SwitchTeam.MainFrame1
local MuteButton = MainFrame:WaitForChild("Mute")
local Songs = {}
for _, child in pairs(Playlist:GetChildren()) do
table.insert(Songs, child.Value)
end
local songNumber = math.random(1, #Songs)
local nextSong = function()
if CurrentSong.IsPlaying then
CurrentSong:Stop()
end
songNumber = songNumber + 1
if songNumber > #Songs then
songNumber = 1
end
CurrentSong.SoundId = Songs[songNumber]
CurrentSong.TimePosition = 0
CurrentSong:Play()
end
CurrentSong.Ended:Connect(nextSong)
-- Start music
nextSong()
MuteButton.MouseButton1Down:Connect(function()
if CurrentSong.Volume ~= 0 then
CurrentSong.Volume = 0
MuteButton.Text = "Unmute Music"
else
MuteButton.Text = "Mute Music"
CurrentSong.Volume = 0.5
end
end)
The mute button does change texts when clicked (obviously I cannot verify if it works anymore because music does not play), however the script WAS functional.

2 comments
Are any errors being logged?
No errors. It just seems to be no longer functional. I'm wondering if it's outdated, but I have no idea.