I have several image labels that are critical to my game, so how can I reliable ensure players don’t just see an empty box when they’re joining. I tried using the content provider preload async function, but it using reliably working. Most of the times, the images eventually load which is fine, but some times they don’t EVER load, which is a critical problem. I notice games like bee swarm simulator don’t ever have unloaded images, so how could I achieve that? Perhaps I’m using preload async wrong…?
Hey.
From my knowledge, I don’t know any methods you could use to “force-load” an ImageLabel. You probably shouldn’t trust me lol. You could provide your script with the preload async function so I can check it out.
However, you could wait until the ImageLabel has loaded. For example:
local ImageLabel = script.Parent
-- Set ImageLabel to the ImageLabel you want to wait for to load
while not ImageLabel.Loaded do
wait()
end
print("Image has been loaded!")
With this method, you could, for example, use a loading screen to hide the UserInterface instances and show the instances when the Label(s) load.
Along with using PreloadAsync I create instances of all the pictures needed during a loading screen, hidden behind a black frame with a higher ZIndex, or even just out of frame. Cheat-y, but it worked. For images that never load, I can’t really say anything since its never happened to me
If they don’t ever load it’s probably just the players connection, in which case PreloadAsync should yield until it does load