I’ve made a series of posts today (and I’m kind of ashamed of it ). Aside from that, I wish to receive help on how I could add songs to a queue using a table(using a remote event). The Client-Side part works fine, as it prints. However, It doesn’t work ServerSided. Anyone have any tips or errors that you can give/point out?
script.Parent.MouseButton1Click:connect(function()
repliactedstorage.Events.SongEvent.AddSong:FireServer(plr,script.Parent.Parent.Text.Text)
print(plr.Name.." made song request: "..script.Parent.Parent.Text.Text)
end)
Client isn’t supposed to refer a player in the arguments. The serverside would think songid is a number, but it was an Instance. Connecting string and Instance would establish an error.
So then would the problem lie with that each song after the first one being set, just replace the 2? And the second one wouldn’t move to the first slot?
What do you mean by processor? I just simply use a module script and when a player joins, 2 seconds later the music plays (the parent script calls the module). I’m not too sure what you mean by processor.
My music system works well but whenever I request something, only the Client Side responds not the ServerSide. So when I run my skip command the ID was never inserted into the table, so it was never queued.
@C4LEBS I would recommend using table.insert and table.remove for adding songs with GUI buttons if that’s what you are going for. By table.remove I meant for once the song is over.
That’s the issue. Without me knowing the songs queue function (that processes every song added in the queue), I hardly would understand what your system is attempting to do, except the part that adds and prints out the newly added song id.
Oh, sorry if I made that unclear. Here is how the system plays:
local songs = {5215548352,1845167601,1842753530}
for i = 1, #songs do
local song = songs[i]
local songname = mps:GetProductInfo(song)
songevent:FireAllClients(songname)
music.SoundId = "rbxassetid://"..song
music:Play()
repeat wait() until music.IsPlaying == false
end
That’s just the main part, this is where the player can add songs to the queue.