Teleport (Method): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Legend26
-.-
>JulienDethurens
No edit summary
Line 3: Line 3:
<onlyinclude>{{Method
<onlyinclude>{{Method
|name                = Teleport
|name                = Teleport
|arguments            = [[int]] PlaceId
|arguments            = [[int]] placeId
|returns              = [[nil]]
|returns              = [[nil]]
|description          = Used in a [[LocalScript]] to teleport a player to the place with ID PlaceId.
|description          = Used in a [[LocalScript]] to teleport a player to the place with ID placeId.
|object              = TeleportService
|object              = TeleportService
}}</onlyinclude>
}}</onlyinclude>
Line 11: Line 11:
{{clear floats}}
{{clear floats}}


{{Example|<code lua>
{{Example|
game:GetService("TeleportService"):Teleport(1818) -- Will teleport a player to "Crossroads", a game by ROBLOX.
This code will teleport a player to Crossroads:
<code lua>
game:GetService('TeleportService'):Teleport(1818)
</code>}}
</code>}}


==See Also==
*[[TeleportService]]
*[[TeleportToSpawnByName_(Method)|TeleportToSpawnByName]]


[[Category:Methods]]
[[Category:Methods]]

Revision as of 00:00, 26 January 2012

Local: This item should be used with a LocalScript in order to work as expected in online mode.
Teleport( int placeId )
Returns nil
Description: Used in a LocalScript to teleport a player to the place with ID placeId.
Member of: TeleportService


Example

This code will teleport a player to Crossroads: game:GetService('TeleportService'):Teleport(1818)


See Also