I’m using :SetTeleportGui() to add a custom loading screen but when it teleports it’s just a blank screen.
ServerScript (Under part with ClickDetector):
local TS = game:GetService("TeleportService")
local RS = game:GetService("ReplicatedStorage")
script.Parent.ClickDetector.MouseClick:Connect(function(playerclicked)
if playerclicked then
RS:WaitForChild("TeleportMinigameGuiRE"):FireClient(playerclicked)
TS:TeleportAsync(9511366334, {playerclicked})
end
end)
(Gui is disabled, and all instances inside of it are visible. Whenever the RemoteEvent fires, it enables it and sets all the instances’ transparency to 1 and then tweens the transparency back to 0.)
local Players = game:GetService("Players")
local TeleportService = game:GetService("TeleportService")
local TARGET_PLACE_ID = 1234 -- replace with your own place ID
local playerToTeleport = Players:GetPlayers()[1] -- get the first user in the experience
TeleportService:TeleportAsync(TARGET_PLACE_ID, {playerToTeleport}, teleportOptions)
Nvm I fixed it now, the problem was I was setting the TeleportGui too late, I had to add a small delay between tweening the gui and teleporting the player.