Hi i am trying to make a music system yet my script does not work, could i please have some help.
local muteButton = script.Parent.Mute
local skipButton = script.Parent.Skip
local currentSongDisplay = script.Parent.CurrentSongDisplay
local musicPlayer = script.Parent.Music
local marketplaceService = game:GetService("MarketplaceService")
local songs = {
1837692031, --Some song that I made a while back
1837324500, --That "Putin Walk" meme
1839448308, --Revenge - Jailbreak Parody
1836965691,
1838569831,
1840402188,
1838569831,
1843382633,
1842940253,
1838742547,
1842522056
--PewDiePie - Floor Gang
}
muteButton.Activated:Connect(function()
if musicPlayer.IsPaused == false then
musicPlayer:Pause()
else
musicPlayer:Resume()
end
end)
skipButton.Activated:Connect(function()
musicPlayer.TimePosition = musicPlayer.TimeLength
end)
while true do
for count = 1, #songs do
musicPlayer.SoundId = "rbxassetid://"..songs[count]
songInfo = marketplaceService:GetProductInfo(songs[count])
musicPlayer.Loaded:Wait()
musicPlayer.TimePosition = 0
musicPlayer:Play()
currentSongDisplay.Text = "Now playing: "..songInfo.Name
musicPlayer.Ended:Wait()
currentSongDisplay.Text = "Loading next song..."
end
end
thanks for youth help