How do you properly create a working and detailed loading screen GUI?

I’ve seen lots of people creating their own loading screen GUIs and let’s just say they aren’t reliable.

What I meant by that is that I see some people use game:IsLoaded() function to constantly yield the code until it returns true and that is that simplest way to create a loading screen GUI. Sure, it does what you want but it’s a bit dissapointing that it doesn’t show much details such as how many assets are loaded, how many are not, and etc.

I’ve seen the usage of ContentProvider.RequestQueueSize and ContentProvider:PreloadAsset(), it works, again, but there are still some issues with it:

  • The RequestQueueSize can vary according to the developer hub.
  • PreloadAsset() requires you to insert a table that consists of all the assets needed to be preloaded for the client.

Sure, I can just do workspace:GetDescendants() and use it to preload the assets, but bear in mind that the client would still be loading stuffs from workspace, so I can’t do that because not every single thing in workspace would be fully loaded when the client loads the assets. Sure, I can define a table that consists of only the assets I want to preload for the client, but again I want it to preload every single assets needed to be loaded regardless of whether or not the asset is presented in the client’s workspace (think of like that the client knows every single assets that needed to be loaded)

So my questions are:

  • how do I make it so that I can get a table of every single assets needed to preload whilst knowing that those assets won’t be loaded for the client at the start of the loading?
  • how do I know if an asset is fully loaded following my previous question?
1 Like