Help with custom loading GUI

Custom loading GUIs are notoriously broken because the PlayerGui loads late, allowing some level geometry to load before the loading screen can display.

I once fixed this in the past by using a black skybox to match the black loading screen. This will obviously only work if the loading screen is a solid color and the camera is pointed away from the geometry being loaded.

  1. Are there any better fixes for this?
  2. Can I dictate the orientation of the camera while loading?

game:GetService’ReplicatedFirst’:RemoveDefaultLoadingScreen()

ReplicatedFirst is what you’re most likely looking for. You’ll need to put any asset you want to use in there, and you can use it for any purpose where you need it when the game starts. I can’t tell by your post if this is what the problem is coming from, but I usually have no issues with it.

An example of what you can do:
https://gyazo.com/cd4a2d10bbe285fbf6ae9ebfd7bc2a44

1 Like

I probably wasn’t clear enough in my post. I know how to make a loading GUI using the manner you described.

What I’m trying to do is make it a seamless transition from the Roblox loading screen to the custom loading screen. In your GIF, it worked great, but often times there will be a time gap between the Roblox screen fading and the custom screen showing.

EDIT: I am suddenly not experiencing this issue… Disregard this post, though I’m still curious about question 2.

EDIT 2: This is what I was doing wrong:


From Custom Loading Screens.

2 Likes

Rather than broken, I think you intended to say that they don’t work as you want them to.

In my personal experience, they have always worked as I wished for them to. The point is determining the order in which your operations should run in. PlayerGui isn’t implicitly available so obviously you’d want to wait until you can access it first to drop a Gui and then hide the default screen.

Take a fade effect where a black overlay fades out to the menu screen. You wouldn’t wait for the fade to finish before showing the Gui; you’d make sure the Gui can be seen as the overlay is fading. The same scenario is applicable here (in fact, exactly this scenario, since the default loading screen also fades).

local Players = game:GetService("Players")
local ReplicatedFirst = game:GetService("ReplicatedFirst")

local LocalPlayer = Players.LocalPlayer
local PlayerGui = LocalPlayer:WaitForChild("PlayerGui")

local Gui = script.LoadingScreen -- Maybe?
Gui.Parent = PlayerGui

ReplicatedFirst:RemoveDefaultLoadingScreen()

-- Loading screen code here maybe

This should get rid of the discrepancy, since the default loading screen would fade out to yours. Place the Gui first, then handle the fade (or in this case, the default loading screen).

3 Likes