Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Preloading Images and removing core Gui's, Please help?

Asked by 10 years ago

No output, the script is in a localscript and positioned here: http://puu.sh/8nGn7.png Basically I'm trying to preload some images and disable some core gui's but neither works. Things I have tried: Changing pairs to ipairs in the for loop. Used a different method for disabling core gui's involving enum

wait(.1)
player = game:GetService("Players").LocalPlayer
player:WaitForChild("PlayerGui"):WaitForChild("HealthGUI"):Destroy() -- this is a test, added in at end
StarterGui = game:GetService("StarterGui")
game.StarterGui:SetCoreGuiEnabled("Health",false)
game.StarterGui:SetCoreGuiEnabled("BackPack", false)
game.StarterGui:SetCoreGuiEnabled("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

1 answer

Log in to vote
1
Answered by
MixCorp 70
10 years ago

Please leave thumbs up!

game.StarterGui:SetCoreGuiEnabled("All",false)
for i=1,#Images do
game:GetService("ContentProvider"):Preload("http://"http://www.roblox.com/asset/?id=" ..Images[i]
end

This would be a way to do it. Ive not seen alot about Preload. But I heard somewhere it was for Sounds only. I could be wrong, But if this works, Leave a thumbs up please.

0
http://wiki.roblox.com/index.php/Preload_(Method) Works for everything, what you have given me is just an adjusted version of the script I had, nothing changed at all apart from disabling all coregui's (which I don't want) crackabottle123 110 — 10y
Ad

Answer this question