How can I load every object in game?

Im making a loading screen using contentProvider and I’ve gotten it working. How can I add “EVERYTHING” in the game other then just the decedents of workspace? I want to get replicated storage and more.

toLoad = game:GetDescendants() --// This doesn't work

local total = #toLoad

Can’t you just do

toLoad = game.ReplicatedStorage:GetDescendants()

?
Or put everything in a table to load certain things

There is the function game:IsLoaded().

I suggest taking a look at this.

Its not working when I add them to a table errors with

attempt to concatenate string with nil

This isn’t what I want, I want to be able to get all parts/stuff in the game.

game:GetDescendants() will try and access the CoreGuis which you can’t access, so you would have to do each service that has parts individually.

1 Like

Firstly, don’t get the descendants in a local script- it’ll be nil if not loaded, which is what I assume is breaking your script here? as far as I know you’d do this by sending the information from server via remote event in replicatedfirst, and have a script that just waits for everything that the server sent, or 120 seconds. You should combine the tables in the server, but check individual items on local script- because you know some of them wont be there. (tl:dr - send information from server via tables, check with local script. table of what “should be there”, not what client sees. check every now and then to see if it’s there.)