TeleportToSpawnByName (Method): Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
>Sncplay42 Add arguments |
>Legend26 Example used wrong method |
||
Line 10: | Line 10: | ||
{{Example|<pre> | {{Example|<pre> | ||
game:GetService("TeleportService"): | 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. | ||
</pre>}} | </pre>}} | ||
[[Category:Methods]] | [[Category:Methods]] |
Revision as of 15:55, 22 July 2011
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. |
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.