Teleport
This is a MapLib Feature. It can be accessed by MapLib:GetFeature("Teleport")
.
Functions
Teleport
This item only works when running on the client. Clientsince 0.11
</>
Teleport:
Teleport
(
) →
(
)
This function can be used to teleport players.
Example:
--Teleports all players ingame to map.Destination and makes the camera face the front.
local PlayersFeature = MapLib:GetFeature("Players")
local TeleportFeature = MapLib:GetFeature("Teleport")
for _, player in pairs(PlayersFeature:GetPlayers()) do
TeleportFeature:Teleport(player, map.Destination.Position, true)
end