How do I ensure my image is fully loaded for my loading screen?

Hi, I have created a loading screen for my game, I am using a decal for a moving background (please see video) and I want to ensure that it is fully loaded when the screen starts. As you can see in my video, there is a short period of time where it tries to load in and there is just the grey frame behind it.

Does anybody know how I can make sure it has loaded/load it in faster for the user when they join? As it happens so fast I’m out of ideas for how I can do this, I did look around for some help but couldn’t find anything relevant to my situation.

Thank you :slight_smile:

maybe use context provider

you could preload async it first.

1 Like

As told above you should use PreloadAsync for the images in your loading screen:

--find those in your loading screen UI
local images = {list of strings or instances to preload}

local ContentProvider = game:GetService("ContentProvider")

ContentProvider:PreloadAsync(images, function(id, fetchStatus)
	print("ID:", id, "loaded! Fetch status:", fetchStatus)
end)

print("All ids loaded!")
--run code supposed to run after your loadscreen loads here
2 Likes

@WickdSuper @NyrionDev Thank you both for your replies, I have tried this just now but I don’t think it quite does what I need. Is this for loading in the images before the loading screen finishes? What I’m looking for is for the second the Roblox screen stops, the grey stripe background of my loading screen to instantly be there as for new players it takes a few seconds for it to appear. I’m wondering if there isn’t a solution for this though?

If it helps, I can get another video of an account joining for the first time so you can see what I mean a bit better?

Thanks again both of you