image.IsLoaded doesn't fire?

Hello. I made a Roblox loading screen that cycles through all the images in the PlayerGui (the script says there are 29 of these) and for each one, either wait until image.IsLoaded is true or 5 seconds has passed. Each image takes 5 seconds to pass, meaning image.IsLoaded isn’t working. Does the image have to actually be shown to the client for it to be true? Why does this happen? Is there a better way to check if the images in my GUIs are loaded?

1 Like

Is loaded is a variable, not an event. On another note the server cannot see this variable, you can send it to the server via a RemoteFunction.

image

Try:

while not imageLabel.IsLoaded do wait() end

It still does not work, even with the new code.

Something in your code is preventing that code to execute, or you have an image that really isn’t loading.

REMEMBER, this code should be on the client. It is not replicated to the server.

I have a printout that shows that the code is executed, but only on the condition that 5 seconds has passed, and not on the condition that the image is loaded. Does the image.IsLoaded thing only become true if the client is looking at the image?

I recommend reading the IsLoaded API.

Use ContentProvider:PreloadAsync to preload images and textures.

In Bloxikins World, I have a ModuleScript which contains a table of all images and textures I need preloaded. It’ll loop through each of these and preload them individually (so I can display a progress bar).

3 Likes