Hi everybody, I'm just trying to make a music gui with a queue system, however i messed up on something and the queued song doesn't play
my code:
game.ReplicatedStorage.RemoteEvents.Music.AddToQueue.OnServerEvent:Connect(function(player,id)
if IsPlaying.Value == true then
if one.Value == "" then
one.Value = id
music.Ended:Wait()
music.SoundId = "rbxassetid://".. one.Value
music:Stop()
music:Play()
print("playing "..id.." now,was 1 position in queue") -- this print was showing, but song wasnt playing.
music.Ended:Wait()
music:Stop()
one.Value = ""
end
end
end)

1 comment
Have you tried placing the IDs in a table, then looping through the table to play the songs?