Custom loading screen not showing up

I made a custom loading screen gui and put it in a screengui named LoadingScreen, which is inside a localscript which is inside replicated first. However, it never shows up.
Localscript in replicatedfirst:

local PlayerGui = game.Players.Localplayer:WaitForChild("PlayerGui")
local GUI = script.LoadingScreen:Clone()
GUI.Parent = PlayerGui

wait(5)

GUI.Frame:TweenPosition(UDim2.new(0,0,1,0),"InOut", "Sine",0.5)
wait(0.5)
GUI:Destroy()
1 Like

Try just putting the GUI inside StarterGui, and put the script inside that. And of course change what’s needed

Have you disabled the ROBLOX default loading screen?

Are there any errors?
The script seems fine as far as I can see, except there is a typo at the first line while attempting to get the LocalPlayer.
The fixed script would look like this:

local PlayerGui = game.Players.LocalPlayer:WaitForChild("PlayerGui")
local GUI = script.LoadingScreen:Clone()
GUI.Parent = PlayerGui

wait(5)

GUI.Frame:TweenPosition(UDim2.new(0,0,1,0),"InOut", "Sine",0.5)
wait(0.5)
GUI:Destroy()

On a side note:

Edit:
Forgot to mention about RemoveDefaultLoadingScreen, which you should be calling after you parented the LoadingScreen to PlayerGui.

1 Like

I guess I forgot about that, I’ll do that now.

Wait, I did, but forgot to include it in the post’s code.

Did you fix the LocalPlayer typo?

I must be blind, lol that fixed it.

1 Like

You probably should mark my post as a solution then.

The only problem I see is a capitalisation error, Localplayer is LocalPlayer