Wiki - Define "default loading screen"

On the method page for RemoveDefaultLoadingScreen, it’d be great if “default loading screen” was defined. Specifically, I’d like to know:

  • “The default loading screen stays up until x condition is met”
  • “The condition the default loading screen checks for can be checked via y”

I can add something later, for now looking at the code might be enough to solve your problem.

1 Like

Thanks! I wasn’t aware it was a public corescript. It looks like if there are items in ReplicatedFirst, it disappears after 5 seconds regardless, and if there aren’t items in ReplicatedFirst, it waits for game:IsLoaded()/game.Loaded (event). Code of interest:

if not hasReplicatedFirstElements then
		if game:IsLoaded() then
			handleRemoveDefaultLoadingGui()
		else
			local gameLoadedCon = nil
			gameLoadedCon = game.Loaded:connect(function()
				gameLoadedCon:disconnect()
				gameLoadedCon = nil
				handleRemoveDefaultLoadingGui()
			end)
		end
	else
		wait(5) -- make sure after 5 seconds we remove the default gui, even if the user doesn't
		handleRemoveDefaultLoadingGui()
	end
1 Like

I wonder why they did the whole :connect() thing while they could’ve just done :wait() …

1 Like