The following code outputs a failure to preload all 3 images.
I am using the instances with the proper assetID property in the argument table. What else could be going wrong?
local ContentProvider = game:GetService("ContentProvider") local map1Snippet = Instance.new("ImageLabel") map1Snippet.Image = "https://www.roblox.com/asset/?id=3528637124" local map2Snippet = Instance.new("ImageLabel") map2Snippet.Image = "https://www.roblox.com/asset/?id=3521669949" local map3Snippet = Instance.new("ImageLabel") map3Snippet.Image = "https://www.roblox.com/asset/?id=3521668508" local assetDic = {map1Snippet,map2Snippet,map3Snippet} ContentProvider:PreloadAsync(assetDic)
What I would prefer is to create a folder somewhere and use a local script to load all the assets.
If there's an error with the script please let me know. I had to write this quickly.
Example:
local contentProvider = game:GetService("ContentProvider") local assetFolder = script:WaitForChild("Textures") -- The folder of assets. contentProvider:PreloadAsync(addToTable()) function addToTable() local assets = {} for _,v in pairs(assetFolder:GetChildren()) do table.insert(assets, v) end return assets end
So to give the rundown on the script, it basically loops through a folder(or any object) grabs the assets, puts them into a table and returns it. Which you can see on line 11. It returns the table it creates when adding all the assets. So all we need to do is call the function.
If im pretty sure that layout the for PreloadAsync would need a table. Ex: game:GetService("ContentProvider"):PreloadAsync({Assets})