I have 120 images that I want to insert into my game. They will work as a gif. I have preloaded them in a script by doing this with every id:

ContentProvider:PreloadAsync({"http://www.roblox.com/asset/?id=435464564564"}) 

because I don't know any other way. But now my problem is that it doesn't seem to work. They take time to load and when they are supposed to come, the image still goes white and it never loads. Does anyone know how I can make it work and if there is a better way to load all of my images?

This is the script I use for the gif: (By the way, these id's are not real)

ViewMain.Image = "http://www.roblox.com/asset/?id=45645645645645"
		wait()
		ViewMain.Image = "http://www.roblox.com/asset/?id=45645646"
		wait()
		ViewMain.Image = "http://www.roblox.com/asset/?id=456456456456"
		wait()
		ViewMain.Image = "http://www.roblox.com/asset/?id=4564564564"
		wait() --and so on...

5 comments

0

If the IDs are not real, of course they wouldn't work.

0

The quickest way to preload images is place them in a table, then preload from table, either one by one, or all at once.

1

Base on the document said, the first parameter is the table of Instances need to be preload not the string(id link) or not i dunno cus the example isn't said that lol https://developer.roblox.com/en-us/api-reference/function/ContentProvider/PreloadAsync

0

The problem isn't so much to preload them faster. It is that the preloading doesn't work if there are too many images. Preloading 20 images worked but not 40. And I have to load 120 images that comes directly after each other as a gif.

0

Btw, the id's are real in my game.