local ContentProvider = game:GetService("ContentProvider")

Hello, I'm currently experiencing an error when I am using the ContentProvider:PreloadAsync() function and I have no idea why its occuring unless, I'm just dumb. So, what you see below is an array of my frames which I want to be preloaded prior to my preshow sequence. I have also stated the ContentProvider:PreloadAsync() function but, it errors everytime, I press the play button on my game.

local Frames = {["Frame1"] = 6309852261, ["Frame2"] = 6309853342, ["Frame3"] = 6309853632, ["Frame4"] = 6309853878, ["Frame5"] = 6309854188, ["Frame6"] = 6309854568, ["Frame7"] = 6309854979, ["Frame8"] = 6309855269, ["Frame9"] = 6309855751, ["Frame10"] = 6309857411, ["Frame11"] = 6309857885, ["Frame12"] = 6309858239, ["Frame13"] = 6309858517, ["Frame14"] = 6309871615, ["Frame15"] = 6309872849, ["Frame16"] = 6309873544, ["Frame17"] = 6309874282, ["Frame18"] = 6309875389, ["Frame19"] = 6309880620, ["Frame20"] = 6309881381, ["Frame21"] = 6309883414, ["Frame22"] = 6309887930, ["Frame23"] = 6309889373, ["Frame24"] = 6309890057, ["Frame25"] = 6309890542, ["Frame26"] = 6309891141, ["Frame27"] = 6309891461, ["Frame28"] = 6309891935, ["Frame29"] = 6309892569, ["Frame30"] = 6309893119, ["Frame31"] = 6309894738, ["Frame32"] = 6309895051, ["Frame33"] = 6309895453, ["Frame34"] = 6309895695, ["Frame35"] = 6309896172, ["Frame36"] = 6309896541, ["Frame37"] = 6309896729, ["Frame38"] = 6309897015, ["Frame39"] = 6309897220, ["Frame40"] = 6309897551, ["Frame41"] = 6309898354, ["Frame42"] = 6309898354, ["Frame43"] = 6309898555, ["Frame44"] = 6309898795, ["Frame45"] = 6309899009, ["Frame46"] = 6309899374, ["Frame47"] = 6309899673, ["Frame48"] = 6309900017, ["Frame49"] = 6309900328, ["Frame50"] = 6309900724, ["Frame51"] = 6309901035, ["Frame52"] = 6309907960, ["Frame53"] = 6309909060, ["Frame54"] = 6309909060}
local FramesLeft = #Frames

ContentProvider:PreloadAsync(Frames, function()
	FramesLeft = FramesLeft - 1
end)

So, here is the error that appears in my output and I have no clue, what I did wrong:

 05:15:41.388  Unable to cast to Array  -  Server - Script:6

If you could help me out, I'd really appreciate it.

2 comments

0

Do I need to specify the "rbxassetid://"?

0

Read this article, it only accepts Instances in an array, not dictionary. If you want to preload strings then Preload function would be for that BUT it's deprecated, don't use it, https://developer.roblox.com/en-us/api-reference/function/ContentProvider/PreloadAsync