Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

how to teleport someone to a different server and reteleport them to the same server?

so basically i want to know if you can teleport someone to a different server then if they want to come back they can teleport back to the server they teleported from. how can i do that. anything appreciated thank you.

2 answers

✓ Accepted answer

Continuing with what Inscendio said.

You could use TeleportToPlaceInstance to teleport a player to a specific server of the place.

All you need is the JobID of the server, and the PlaceID for the place.

Example would be you sent a player to a created server of your own, but remember to save the JobID and PlaceID within the TeleportData table, and retrieve them through LocalPlayerArrivedFromTeleport, or you could do it a different way that you would like.

Following links for you to explore LocalPlayerArrivedFromTeleport TeleportToPlaceInstance

To do this, it's very simple. You'll just need the TeleportService.

For example, when the player touches a part, he will be teleported to the other server. The script would be something like this:

local TeleportService = game:GetService("TeleportService")
local level1Id = 408502340

function onTouched(hit)
	local player = game.Players:GetPlayerFromCharacter(hit.Parent)
	if player then
	TeleportService:Teleport(level1Id, player)
	end
end

script.Parent.Touched:connect(onTouched)

That level1Id you see is the place ID. The place ID will be the place ID of the destination. You can get the place ID from the link of the Roblox website of the game. For example:

https://www.roblox.com/games/**432809446**/Example-Game

The numbers from the link in bold is the place ID.

2 comments

0

i know how to teleport someone but am asking how to teleport someone to a different game and if the player wants to teleport back to the game he just teleported from he joins the same server he teleported from at first.

0

^thats not possible

This discussion is preserved as it was. New answers, comments, and votes are closed.