Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

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

Asked by 6 years ago

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

Log in to vote
0
Answered by 6 years ago

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!

0
Thanks! This really helped. Skeleyyy 9 — 6y
Ad

Answer this question