So, I'm making a music player. I'm looping through the sounds using a For Loop. This is my script,
local Music = script.Parent:WaitForChild("MusicFolder"):GetChildren()
while true do
for i = 1,#Music do
Music[i]:Play()
Music[i].Ended:wait()
wait(.5)
end
end
On line 1, you'll notice I'm getting a table from a folder of sounds. The for loop on line 4 will play the sounds in order.
I'm doing this because I don't want the same sound to play more than once until all other sounds have been played.
So, my question is, how do I randomize the table? There may also be better ways of doing this that I'm unaware of. If there is, tell me.
Thank You

1 comment
I tested this, and it works great. Thank you m8.