Make GUI Show up Without Character Loaded in

So basically, I want to show a loading gui when the player isn’t loaded in. I have made it so that the player does not load in when they join, and I want that gui to show up when they join, even without being loaded in (i have CharacterAutoLoads off) however I can’t show it through startergui since the player isn’t loaded in. I’ve tried moving the loading gui into replicated storage and having it move from there to the player gui through a local script, but that hasn’t worked either. Any help would be appreciated! :slight_smile:

Also here’s the code for the local script I made:

local playersService = game:GetService("Players")
local replicatedStorageService = game:GetService("ReplicatedStorage")
local localPlayer = playersService.LocalPlayer
local gui = replicatedStorageService.Loading

gui.Parent = localPlayer.PlayerGui
1 Like

You would have to parent the Gui via ServerScript.

Why? you may ask.

Its because StarterGui only replicates the gui to the player whenever the character loads. disabling CharacterAutoLoads removes the ability for the player to load their character unless you use player:LoadCharacter().

The way i’d do it is: (and I have done it in many of my projects and it has worked without fail)

  • parent the gui to StarterGui as usual (for easy access in studio editing the gui)
  • create a serverScript to insert every item in StarterGui into the player upon joining.
game.Players.PlayerAdded:Connect(function(plr)
    for _,obj in pairs(game.StarterGui:GetChildren()) do
        obj:Clone().Parent = plr
    end
end)

hope that helps!

2 Likes

You can do it locally by making a localscript in ReplicatedFirst too

1 Like

Put The Script in ReplicatedFirst + you need to wait things to load like playergui etc.

So you need to call WaitForChild function for player and I recommend adding game.Loaded:Wait() after the service varibles.

local playersService = game:GetService("Players")
local replicatedStorageService = game:GetService("ReplicatedStorage")

game.Loaded:Wait()

local localPlayer = playersService.LocalPlayer
local gui = replicatedStorageService.Loading

gui.Parent = localPlayer:WaitForChild("PlayerGui")
3 Likes