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.
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