I have been trying this code recently but it just does not load images early. It still needs time to “Download” the image before u can actually work with it.
for _,v in playerGui:WaitForChild("OnScreenGui"):GetDescendants() do
if not v:IsA("ImageButton") and not v:IsA("ImageLabel") then continue end
if v.Image == "" then continue end
table.insert(PreloadingMaterials, v)
end
ContentProvider:PreloadAsync(PreloadingMaterials, function(a)
if a == "" then return end
currentProgress += 1
assetPercentage = math.round(currentProgress/AmountToLoad) * contentLoading
end)
Is there something i am doing wrong? I would love to know the solution to this. I also tried searching many many posts and saw only others who shared a similar issue but no solutions.
Thats what im trying to do but it has issues loading. Sometimes it skips loading completely. Im mostly having issues with images i tween from 1 transparency to 0 transparency for the first time.
If you have an intro that can cover the display, under that you can load your images for a moment. Images are manually preloaded/prebuffered. It’s a bit old school but it still works… Will cure GUI image backgrounds also not being loaded and blinking in the first time they are shown.
As far as the start up…
There are other tricks. Like a task.wait(3) on top of some of the intro scripts to stall for that program loading time. You’re not going to see this as that’s about how long it takes anyways to start being able to show any graphics. This way you’re not forcing it before the fact. A bit hit and miss the other way depending on the connection at the time.
Here is a trick I use to get a black background going before I can get a black image background up.
local rns=game:GetService("RunService")
local Lighting=game:GetService("Lighting")
Lighting.ExposureCompensation= -100 rns.Stepped:Wait()
--then after I'm ready to fade to my intro with a set black background up.
Lighting.ExposureCompensation=0
This is seamless swap to the fade black background and gives you a way to get things set up without it being noticed. Cost you a moment of the screen still black on load…