:GetDescendants() does not get all descendants

I was originally trying to stress-test a loading screen I had created, when I realised the amount of assets was insanely low. I had inserted a few texture packs of the toolbox and none of them were showing up.

While debugging, I found out that game:GetDescendants() was not infact, getting all descendants.

for _, v in game:GetDescendants() do
	if (#v:GetDescendants()) ~= 0 then
		print(#v:GetDescendants())	
	end
end

Ran in a seperate LocalScript inside of ReplicatedFirst. The output should be nothing, since there shouldn’t be any descendants or even any children if its traversing down the entire path.

Here’s the kicker:

Why is game:GetDescendants() not getting all descendants?

Try using serverscripts to detect all, if streaming enabled is turned on, some parts of the game wont load on client side and GetDescendants will miss them.

Anything that’s in the workspace won’t automatically load unlike everything else. Your loading screen should only preload animations, sounds, and materials/textures

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.