Lets say for example you use a lot of image decals. Usually they can take a long time to load, especially on first startup of a game.
This will cause a decal to give a grey screen until it is properly accessed by the server. Is there a way you can put a text decal where the image decal should be until it loads?
You can use this to load almost everything that have IDs, except model.
01 | local ContentProvider = Game:GetService( "ContentProvider" ) |
02 |
03 | local function LoadAssets(AssetList) |
04 | -- Takes an asset list and preloads it. Will not wait for them to load. |
05 |
06 | for _, AssetId in pairs (AssetList) do |
07 | ContentProvider:Preload( "http://www.roblox.com/asset/?id=" .. AssetId) |
08 | end |
09 | end |
10 |
11 | LoadAssets( { 2253543 , 2434541 , 5133543 , 2423433 , 41143243 , 2453865 , 21433365 , 2154549 } ) |
You can go this link to learn more information about it:
http://wiki.roblox.com/index.php?title=API:Class/ContentProvider/Preload
I hope this helps.