I am making a custom loading GUI, and I was trying to make it so it only goes away when everything has loaded. Since I'm not a master at coding, my first thought was to just make the loading GUI stay up until a certain brick has loaded. I want this brick to load last, so I know that everything has loaded. I got the code from the ROBLOX Wiki, and this is what I have so far:
local PlayerGui = game.Players.LocalPlayer:WaitForChild("PlayerGui")
PlayerGui:SetTopbarTransparency(0)
local screen = Instance.new("ScreenGui")
screen.Parent = PlayerGui
local textLabel = Instance.new("TextLabel")
textLabel.Text = "Loading"
textLabel.Size = UDim2.new(1,0,1,0)
textLabel.FontSize = Enum.FontSize.Size14
textLabel.Parent = screen
script.Parent:RemoveDefaultLoadingScreen()
local count = 0
repeat
textLabel.Text = "Loading " .. string.rep(".",count)
until --this is where i'd put "workspace:WaitForChild("brick")", and that brick would be the last thing to load
screen.Parent = nil
can anyone help?

4 comments
this isn't possible. I'm pretty sure roblox automaticly waits for everything to load before spawning the character.
That is what I thought, but when I join a game, usually Decals and textures and stuff aren't fully loaded yet, and certain things a grey. I've seen loading screens that wait for things not to be grey, so I was wondering,
Use PreloadAsync in ContentProvider. The function yields until all of it loads.
Study PreloadAsync, this is what you'll need for loading assets. I'm no master at this, I'm quite new to it so I have to practice myself on this.