Hello!
Question: How do I set up my ReplicatedFirst script with it's custom Load screen to finish, before the player is added to the game?
My game is a deathmatch rounds system, and players can pop into a game that's currently on-going, but with the load screen, they're sitting ducks waiting for the load screen to fade away, while other players are able to attack them. I want the load screen to finish loading, before they're added to the game.
Example script:
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
local start = tick()
while tick() - start < 6 do
textLabel.Text = "Loading " .. string.rep(".",count)
count = (count + 1) % 4
wait(.3)
end
PlayerGui:SetTopbarTransparency(1)
screen.Parent = nil
Thanks!
