I recently watched TheDevKing’s Sounds and Music tutorial and I wanted to try it for myself. I have a folder in ReplicatedStorage that has all of my sounds in it. I tried to make an in pairs loop to play all of the songs and then used the content provider to load all the songs in but then I had an error (below)
Unable to cast to Array
My script is being shown below and I don’t know what is wrong with my script because I followed what TheDevKing did and somehow I still got this error. If anyone knows anything about this, please help me. It is very appreciated and thank you in advanced.
local Music = game.ReplicatedStorage.Music
local ContentProvider = game:GetService("ContentProvider")
while true do
wait(1)
for i, v in pairs(Music:GetChildren()) do
ContentProvider:PreloadAsync(v)
v:Play()
end
end