I am trying to preload all the images in two modules using one function to keep this script clean and optimized. But whenever I attempt to do so, it gives me the error: 10:48:01.985 Unable to cast Dictionary to Content - Client - Loading:100
Here is the code:
local a = 0.0
local b = {Images, SpriteSheets}
for _, image in pairs(b) do
ContentProvider:PreloadAsync({image},PreloadFailed)
a = a + 1.0 StatusLabel.Text = ("Loading Images... ("..a..")")
end
What am I doing wrong? And how can I make this work and preload all the assets in both modules using only one function?