GUI Appearing as Primary before Everything:

Hello, everybody!

I was hanging around and I decided to take a little visit to one of the old events created by the Roblox platform, Egg Hunt 2019: Scrambled in Time.

While looking into the minimalistic environment, I went to one of the little areas where you could get teleported to a multi-place and further noticed that, while having the loading screen and half of my character being added to the game, as well as in-game’s assets, I analysed that there is a GUI that any time you teleport, it will always appear as “primary”.

Quite reviewing over, and over again, it seems that they deleted the default loading screen, but to make it quick, that leads me to consider it a bit of a mystery…

Does anyone know how it can be possible to structure a script?

Thank you!

1 Like

This is a parameter to TeleportService.Teleport.

2 Likes

Yes, I got that too (I forgot to put in the topic’s description)! Although, while reading through the documentation, does it have any relation to the instance GetArrivingTeleportGui?

I think this Roblox Document will help you out!

It informs us how we can change the Roblox Default Loading Screen to a custom one.

Both GetArrivingTeleportGui & SetTeleportGui are just the preferred alternatives, as it can be called prior to the teleport

I don’t think there’s really any difference about it performance wise, but just as long as you set a Teleport UI parameter for the function to pass through, and call GetArrivingTeleportGui back in another place (Within the same game) you should be fine

  • Place #1 in a LocalScript:
local TPService = game:GetService("TeleportService")
local RS = game:GetService("ReplicatedStorage")
local Plrs = game:GetService("Players")

local TeleportUI = RS:WaitForChild("TeleportUI")

local Plr = Plrs.LocalPlayer
local PlrGui = Plr:WaitForChild("PlayerGui")

local PlaceID = 0000000

TeleportUI.Parent = PlrGui

TPService:SetTeleportGui(TeleportUI)
TPService:Teleport(PlaceID)
  • Place #2, same scenario except we replace SetTeleportGui with GetArrivingTeleportGui (ReplicatedFirst also has a method to remove the Default Loading Screen)
local TPService = game:GetService("TeleportService")
local Plrs = game:GetService("Players")
local RF = game:GetService("ReplicatedFirst")

local Plr = Plrs.LocalPlayer
local PlrGui = Plr:WaitForChild("PlayerGui")

RF:RemoveDefaultLoadingScreen() -- We remove this and replace it with our own loading screen

local ExpectedUI = TPService:GetArrivingTeleportGui()

if ExpectedUI ~= nil then -- This can return back as "nil", keep in mind that
    ExpectedUI.Parent = PlrGui
end
1 Like

I am necroposting because I am still confused about about how to set a GUI that will appear after interacting with the TeleportService and go to a multi-place within the primary experience as you can see by the video in the topic.

Confusing. Do you mean that weird tendency of those black bars on the bottom and right to show up? It should occur that you are able to remove the default loading screen via a function in ReplicatedFirst even before the character loads.