So i had a question saying that i had a few images that failed to load by the server, so I tried making a script with the code provided by the Roblox Wiki.
I know my pictures were appropriate. They're just pictures of planets/space.
This code was in a LocalScript
and this was what the wiki provided: (This was placed in ReplicatedFirst
.)
local ContentProvider = gwame:GetService("ContentProvider") -- load a bunch of assets local assets = {968334406, 890538244, 879029658, 701954912} for _, asset in ipairs(assets) do ContentProvider:Preload("http://www.roblox.com/asset/?id=" .. asset) end -- wait for them to complete while ContentProvider.RequestQueueSize > 0 do wait(0.1) end
How I changed the script:
local ContentProvider = game:GetService("ContentProvider") local player = game.Players.LocalPlayer local gui = player.PlayerGui gui.LoadingGui.BG.LoadingLabel.Text = "Loading Decals/Assets..." local assets = {968334406, 890538244, 879029658, 701954912} --Coming soon: 879029658 for _, asset in ipairs(assets) do ContentProvider:Preload("http://www.roblox.com/asset/?id=" .. asset) end -- wait for them to complete while ContentProvider.RequestQueueSize > 0 do wait(0.1) end gui.LoadingGui.BG.LoadingLabel.Visible = false print("Assets Loaded")
Output:
CententProvider failed to load 'asset' http://www.roblox.com/asset/?id=968334406 CententProvider failed to load 'asset' http://www.roblox.com/asset/?id=968334406 CententProvider failed to load 'asset' http://www.roblox.com/asset/?id=968334406 ^ That wasn't exactly what the errors said, but it was close.
Images didn't load! What else do I do?
IF YOU HAVE AN ANSWER BUT IT'S SMALL, PLEASE POST IT AS AN ANSWER, NOT A COMMENT!!