TeleportToSpawnByName (Method)

From Legacy Roblox Wiki
Revision as of 02:21, 14 January 2012 by >Samacado
Jump to navigationJump to search
Local: This item should be used with a LocalScript in order to work as expected in online mode.
TeleportToSpawnByName( int PlaceId, string SpawnName )
Returns nil
Description: Teleports someone like Teleport, but has a second argument allowing someone to teleport to a certain spawn. However, the spawn must have its Neutral property true.
Member of: TeleportService


Example

game:GetService("TeleportService"):TeleportToSpawnByName("1818", "TeleportSpawn") -- Will teleport a player to "Crossroad" a game by ROBLOX, and if there is a spawn named "TeleportSpawn" then the player would spawn on it.