My decals take forever to load so I used this script but I don't know where to put it. If I want to make my decals load faster, do I put this script in "StarterGUI" or in "WorkSpace" Please help...
Here's a link to where I got this script:
http://wiki.roblox.com/index.php?title=API:Class/ContentProvider/Preload
local ContentProvider = Game:GetService("ContentProvider") local function LoadAssets(AssetList) -- Takes an asset list and preloads it. Will not wait for them to load. for _, AssetId in pairs(AssetList) do ContentProvider:Preload("http://www.roblox.com/asset/?id=" .. AssetId) end end LoadAssets({2253543, 2434541, 5133543, 2423433, 41143243, 2453865, 21433365, 2154549})
This would go in the ReplicatedFirst as a localscript. This is commonly included with a load screen Custom_loading_screen and includes ContentProvider RequestQueueSize to check that the game has loaded.
Once the RequestQueueSize is 0 then you know that the assets have been cached so that when they are needed there will not no lag when using the asset.