Need help with custom loading screens when teleporting to another game

So I have a script that gets the arriving teleport gui.

local teleport = game:GetService("TeleportService")
local gui = teleport:GetArrivingTeleportGui()
if gui then
	gui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
	wait(2.5)
	gui:Destroy()
end

game.ReplicatedStorage.SetTeleport.OnClientEvent:Connect(function(gui)
	teleport:SetTeleportGui(gui)
end)

However this doesn’t show up.

I’m think that [a] there is no gui (haven’t used debugging yet), [b] the gui shouldn’t be destroyed, or [c] the gui is destroyed to early.