Default Loading Screen won't go Away

I’m trying to make a custom loading GUI. This is what the LocalScript looks like that I put inside ReplicatedFirst. This LocalScript has the UI that I want to pop up as the parent. What’s wrong with the script?

game.ReplicatedFirst:RemoveDefaultLoadingScreen()

local PlayerGui = game.Players.LocalPlayer:WaitForChild("PlayerGui")
PlayerGui:SetTopBarTransparency(0)

local GUI = script.LoadingScreen:Clone()
GUI.Parent=PlayerGui

repeat wait(1) until game:IsLoaded()

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

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

1 Like

I got this code from AlvinBlox. There’s a link to the video and script that I learned from.

Well if you got the code from him then I think you didnt learn, try doing a different one.

I think the problem is at repeat wait(1) until game:IsLoaded()

Should I change it back to wait(5) then? The current method written above worked for AlvinBlox.

Try printing whats the parent of GUI at the moment you set it to PlayerGui

1 Like

print(“one”)
game.ReplicatedFirst:RemoveDefaultLoadingScreen()
print(“two”)

local PlayerGui = game.Players.LocalPlayer:WaitForChild(“PlayerGui”)
print(“three”)
PlayerGui:SetTopBarTransparency(0)
print(“four”)

local GUI = script.LoadingScreen:Clone()
GUI.Parent=PlayerGui

print(“five”)

repeat wait(1) until game:IsLoaded()
print(“six”)

GUI.Frame:TweenPosition(UDim2.new(0,0,1,0), “InOut”, “Sine”, .5)
print(“seven”)
wait(.5)
print(“eight”)
GUI:Destroy()

Can you run this code and send the output I am on mobile sorry if there are mistakes. Try printing stuff

the b in bar in SetTopbarTransparency(0) is supposed to not be capitalized. That might be it.

Actually it is capitalized on your script.

I printed the parent and it said PlayerGui

Yeah I changed it it wasn’t supposed to be and now it isn’t anymore. Sorry, I meant supposed to not be capitalized when I said that.

Put it in ReplicatedStorage (30chars)

This error comes right before it prints out the parent, could this be related to that script?
11:31:51.812 - Maximum event re-entrancy depth exceeded for ScriptContext.Error

I was told to put it in ReplicatedFirst but I’ll try that.

Disregard that lol I’m tired. Took a fat test.

PlayerGui:SetTopbarTransparency(0)

Ok I’m seeing it now but it only comes up after the default loading screen is done. Something is preventing the default one from going away.

game.ReplicatedFirst:RemoveDefaultLoadingScreen()

local PlayerGui = game.Players.LocalPlayer:WaitForChild("PlayerGui")
PlayerGui:SetTopbarTransparency(0)

local GUI = script.LoadingScreen
GUI.Parent=PlayerGui

wait(10)

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

Try adding a wait() above the game.ReplicatedFirst:RemoveDefaultLoadingScreen

Still shows both custom and default UIs.

Edit: I made it wait(1) instead of just wait() and it worked.

1 Like

Umm… actually it still doesn’t work in player.

Glad I could help bro, 30chars

It works on studio but look here it doesn’t work [WORK IN PROGRESS] Cheese Obby - Roblox

Respond whenever you can, but I have to go now.