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

How do I make a player spawn on a special Spawn Location when teleported from another game?

So I know... A bit about scripting... And I'm trying to make a game, that will teleport you to another game ( I already got that part done) and on the other game that you got teleported to, instead of spawning in the original Spawn Location, you spawn on a special one. I tried the Roblox Wiki and stuff, still couldn't find anything.

Someone help me lol.

1 answer

✓ Accepted answer

Teleport Service has a special parameter that allows you to select the name of the spawn you would like the player to spawn at the function is called TeleportToSpawnByName

Here is an example of how it is used:

local teleportservice = game:GetService("TeleportService")

function TeleportPlayer(player,placeid,spawnname) -- "spawnname" must be a string value!
	teleportservice:TeleportToSpawnByName(placeid,spawnname,player)
end

Hope this helped!

1 comment

0

Thanks! This really helped.

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