How in the world do I use this script?

I’m currently messing around with the customteleportui. And I’m really stumped on this script in the Developer Article. And here’s the script:

-- Local script in other place
 
-- Declare local variables for Roblox Services
local TeleportService = game:GetService('TeleportService')
local UserInputService = game:GetService('UserInputService')
local StarterGui = game.StarterGui
 
-- Hide Core GUI and mouse
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, false)	
UserInputService.MouseIconEnabled = false	
 
-- Bind function to teleport arrival
TeleportService.LocalPlayerArrivedFromTeleport:Connect(function(loadingGui, data)
	-- Pause briefly to allow level to load	
	wait(2)	
	
	-- Fade out loading screen
	for i = 0, 1, .05 do
		loadingGui.loadingScreenFrame.BackgroundTransparency = i
		wait()
	end
	loadingGui.loadingScreenFrame.BackgroundTransparency = 1
	
	-- Show Core GUI and mouse
	game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, true)
	UserInputService.MouseIconEnabled = true	
end)

Basically what my problem is that, I’m trying to get something like this:


But instead I end up with this:

And here’s the code I’m using for the arrived function:
local loadingScreen = script.Loading

local TeleportService = game:GetService("TeleportService")

local PlayerGui = game.Players.LocalPlayer.PlayerGui

TeleportService.CustomizedTeleportUI = true

local loadingScreenClone = loadingScreen:Clone()

loadingScreenClone.Parent = PlayerGui

TeleportService.LocalPlayerArrivedFromTeleport:Connect(function(loadingGui, data)

wait(2)

loadingScreenClone.Frame.Visible = false

end)

And this script is located in ReplicatedFirst. Any help?

remove the default loading screen and replace it with the loading screen UI

How would I do that function exactly?

local gui = script.LoadingScreen
local z = gui:Clone()
z.Parent = pgui
local rf = game:GetService("ReplicatedFirst")
rf:RemoveDefaultLoadingScreen()

repeat wait() until game:IsLoaded()
z:Destroy()

That didn’t solve it at all. In fact it made it even worse.

if you want it to stay a bit longer then you can add a wait() before destroying the loading screen

It’s not that it’s not staying long enough, it’s the fact that it doesn’t do it completely smooth like how I want it to.

Make a script in Replicated storage and write

game.ReplicatedFirst:RemoveDefaultLoadingScreen()

try using

local ts = game:GetService("TeleportService")
local rf = game:GetService("ReplicatedFirst")
local z = ts:GetArrivingTeleportGui()
rf:RemoveDefaultLoadingScreen()
z.Parent = game.Players.LocalPlayer.PlayerGui

wait(10)
z:Destroy()

How am I suppose to get the custom Arriving Gui that I want?

that’s what getarrivingteleportgui does

Yeah but it doesn’t call the screen gui that I want. Do I put the screen gui in the brackets?

you need to use TeleportService:SetTeleportGui(GuiInstance) on the server

I found a video on youtube that explained everything that I was confused on. But thanks for your help anyways! :slight_smile: