I’m trying to preload audio like this
But I’m getting this error
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??
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 )
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.