:SetTeleportGui() results in black screen

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)

LocalScript (Under TeleportGui in StarterGui)

local TweenService = game:GetService("TweenService")
local TS = game:GetService("TeleportService")
local RS = game:GetService("ReplicatedStorage")

local event = RS:WaitForChild("TeleportMinigameGuiRE")

event.OnClientEvent:Connect(function()
	script.Parent.Frame.BackgroundTransparency = 1
	script.Parent.Frame.TextLabel.TextTransparency = 1
	script.Parent.Frame.TextLabel.UIStroke.Transparency = 1
	script.Parent.Enabled = true
	TweenService:Create(script.Parent.Frame, TweenInfo.new(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), {BackgroundTransparency = 0}):Play()
	TweenService:Create(script.Parent.Frame.TextLabel, TweenInfo.new(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), {TextTransparency = 0}):Play()
	TweenService:Create(script.Parent.Frame.TextLabel.UIStroke, TweenInfo.new(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), {Transparency = 0}):Play()
end)

TS:SetTeleportGui(script.Parent)

(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.)

Here is a video of what happens:

Are you sure you’re using the correct transparency at the end. Is it an ImageTransparency.

I’m not sure what you mean, all the types of transparencies are correct.

After you teleaport to the 2nd program … press F9 and take a look for errors. Server and Client.
(I messed that up good … lol)

There’s ‘exception while signaling: Unable to cast to Dictionary’ but Idk if that’s apart of the place I’m teleporting to, lemme check.

I checked and it’s because of the teleport, however when I remove the {} in TeleportAsync() it errors and doesn’t work. So I have no idea what to do.

Maybe try

tService:Teleport(placeID, player, data)

You should teleport on the client, as you are not using any of the extra features TeleportAsync provides.

Looking for testing options lolmansReturn.
MaxGamerFun maybe this will help.

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)

This is from Roblox Documentation on this. … Seems to be some differences in how things are getting called.

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.

3 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.