Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Simpler way to load game assets?

I know that you can use Preload to load assets but can you loop through all game assets that you make in studio or would I have to save them all into a table and then preload them? Asking here so i don't waste a load of time copying all the IDs

1 comment

0

Nope

1 answer

If you have ImageLabels in that folder, then yes, you can do that.

local assets = script.Parent.Images 
for i,c in pairs(assets:GetChildren())
game:GetService("ContentProvider"):Preload(c.Image)
end)

But if you had multiple Number Values that represent each asset in that folder, you could just change c.Image to c.Value. This was written of the top of my head, so if there are any issues please comment. Otherwise accept my answer please!

1 comment

0

I don't think you fully understood what i meant, i mean is there anyway to do it with these images http://prntscr.com/ghvnva which i don't think are parented to anything

This discussion is preserved as it was. New answers, comments, and votes are closed.