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

How to check if an image is cached?

Asked by
Benbebop 1049 Moderation Voter
4 years ago
Edited 4 years ago

I have many buttons that change icons when clicked. Problem is that the first time the icon changes the image is not cached, so there is a couple of seconds where there is no image before it loads.

My plan is to create a bunch of image labels with my images in them, then delete them all once they load. To time it right is there some way to see if an image label's image is cached or loaded? There is a way to check if audio is loaded so why not images?

I did it manually and it cached the images correctly, so I know the concept works.

1 answer

Log in to vote
1
Answered by 4 years ago

https://developer.roblox.com/en-us/api-reference/property/ImageLabel/IsLoaded

Hope this helps

Ad

Answer this question