I can't PreLoad Audio

I’m trying to preload audio like this 0cb6212b0a821ad4e4fc1d252161bfe3
But I’m getting this error73f56948a249ebad12db65c733686faf

That definitely isn’t a helpful error, I’ll report this internally.

PreloadAsync is supposed to take a table of objects that you want to preload, not an object. Try inserting all of the sounds into a table, and then call PreloadAsync using that table.

2 Likes

So this will wait for those sounds to load and run everything below after it’s done right??
6324da09011f918343adf481162ce4e7

Correct.

Also tip for the future, you can use dictionaries for your sound database.

local sounds = 
{
     theme = 000000;
     idklol = 1337;
}

for name,id in pairs(sounds) do
    — stuff
end

(I typed this on my iPad, which is why the example is lazy :swag:)

3 Likes

Well that surely will save me tons of time. Thanks for the tip. I’m used to coming up with my owns ways for everything since I’m lazy to search for them in wiki.