TeleportToSpawnByName (Method): Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
>Legend26 Example used wrong method |
>Legend26 No edit summary |
||
Line 1: | Line 1: | ||
{{local}} | |||
<onlyinclude>{{Method | <onlyinclude>{{Method | ||
|name = TeleportToSpawnByName | |name = TeleportToSpawnByName | ||
|arguments = [[int]] PlaceId, [[string]] SpawnName | |arguments = [[int]] PlaceId, [[string]] SpawnName | ||
|returns = [[nil]] | |returns = [[nil]] | ||
|description = Teleports someone like [[Teleport_(Method)|Teleport]], but has a second argument allowing someone to teleport to a certain spawn. | |description = Teleports someone like [[Teleport_(Method)|Teleport]], but has a second argument allowing someone to teleport to a certain spawn. However, the spawn must have its Neutral property true. | ||
|object = TeleportService | |object = TeleportService | ||
}}</onlyinclude> | }}</onlyinclude> |
Revision as of 02:16, 14 January 2012
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", "SomeSpawnName") --> Will teleport a player to crossroads, and if there was a spawn named "SomeSpawnName" then you would spawn there.