I wish to preload some decals so they do not have to load when they are needed but beforehand so they come up instantly. I also wanted to disable the health, backpack and chat GUI's. None of this works. It is all in a localscript inside of StarterGui. What have I done wrong?
wait(.1) game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Health, false) game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.BackPack, false) game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, false) Images = {154661376,154661390,154661404,154661415,154661431,154661453,154661473,152212548,152210708,154567083,154534470,154567321,154570980,154567343,154570977,154570974,154570968} for i,v in pairs(Images) do game:GetService("ContentProvider"):Preload("http://www.roblox.com/asset/?id=" .. v) end
First of all, is this in a local script? I suggest not getting rid of you backpack, as this will remove the 123456789 tools on the bottom of your screen.Here's how you can write the removal of the core guis. I've seen that removal code in the questions and it doesn't work. Try the below code instead it will work.
game.StarterGui:SetCoreGuiEnabled("Health",false)
As for the image, im pretty certain the only way you can use the preload function is with ipairs, not pairs. The EXACT code is on the wiki, so check it out.