Help with teleporting without showing the default teleporting screen

Hi, I need help making a teleport to a different game/places that does not show the default teleport but instead shows gui.

I have tried taking apart soft shutdown scripts and it did not work at all, I look at tutorials but never never found one that worked for me.

So I have the gui all ready here is the link: teleporting - Roblox
I made the GUI it is name “teleporting”.

I would really really appreciate it if it is made!

3 Likes

TeleportService lets you set a custom teleport GUI using :SetTeleportGui(). Here’s an example script of it in action:

local teleportService = game:GetService("TeleportService")

local teleportGui = script.Parent --Path to the teleport GUI

teleportService:SetTeleportGui(teleportGui)

Hope this helps,
Fizzitix

2 Likes

Where should I put the script and is it a local script?

2 Likes

Use :SetTeleportGui() in the same script you are teleporting the player in. Put the GUI somewhere the script can access it, like ServerStorage.

Let me know if you need more guidance!
Fizzitix

2 Likes

like this?


local TeleportService = game:GetService("TeleportService")
local gameID = 11533683844
 
function onTouched(hit)
    local player = game.Players:GetPlayerFromCharacter(hit.Parent)
	if player then
		local teleportGui = script.Parent.Parent.Parent.ServerStorage.teleporting
		TeleportService:SetTeleportGui(teleportGui) 
		TeleportService:Teleport(gameID, player)
    end
end

script.Parent.Touched:connect(onTouched)

1 Like

That would work, but you really only have to use it once:

local TeleportService = game:GetService("TeleportService")
local gameID = 11533683844

local teleportGui = game.ServerStorage.teleporting
TeleportService:SetTeleportGui(teleportGui) 
 
function onTouched(hit)
    local player = game.Players:GetPlayerFromCharacter(hit.Parent)
	if player then
		TeleportService:Teleport(gameID, player)
    end
end

script.Parent.Touched:Connect(onTouched)

Hope this helps,
Fizzitix

2 Likes

it takes a few seconds to teleport you and it does not show the Gui.

1 Like

My apologies, you can only use :SetTeleportGui() on the client. I assumed it would replicate, but apparently not.

You’ll have to set up a RemoteEvent and fire it every time you teleport a player to make this work. You’ll also need to move the GUI to somewhere like ReplicatedStorage so the client can access it.

Example scripts:

Server script:

local TeleportService = game:GetService("TeleportService")
local gameID = 11533683844

local teleportEvent = game.ReplicatedStorage.Teleport --Path to the RemoteEvent
 
function onTouched(hit)
    local player = game.Players:GetPlayerFromCharacter(hit.Parent)
	if player then
        teleportEvent:FireClient(player)
		TeleportService:Teleport(gameID, player)
    end
end

script.Parent.Touched:Connect(onTouched)

Client LocalScript (located in StarterPlayerScripts):

local teleportService = game:GetService("TeleportService")

local player = game.Players.LocalPlayer
local playerGui = player.PlayerGui

local teleportEvent = game.ReplicatedStorage.Teleport --Path to the RemoteEvent

local teleportGui = game.ReplicatedStorage.teleporting

teleportEvent.OnClientEvent:Connect(function()
    teleportGui.Parent = playerGui --Makes the GUI appear instantly instead of having to wait a few seconds
    teleportService:SetTeleportGui(teleportGui)
end)

Please note that the teleport GUI will only work when teleporting to places inside your own game, and will not work if teleporting to other games (e.g. you teleport to ‘Welcome to Bloxburg’).

Let me know if there are any more problems,
Fizzitix

2 Likes

The gui does not go through to the next game(The places of the game)

2 Likes

Apparently there can be some delay with the RemoteEvent, and it does not change the loading screen fast enough. See if adding a delay before attempting to teleport fixes the problem:

Server script:

local TeleportService = game:GetService("TeleportService")
local gameID = 11533683844

local teleportEvent = game.ReplicatedStorage.Teleport --Path to the RemoteEvent
 
function onTouched(hit)
    local player = game.Players:GetPlayerFromCharacter(hit.Parent)
	if player then
        teleportEvent:FireClient(player)
		task.delay(3, function()
            TeleportService:Teleport(gameID, player)
        end)
    end
end

script.Parent.Touched:Connect(onTouched)

Hope this fixes the problem,
Fizzitix

2 Likes

Thank you so much it works! it is good

1 Like

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