Skip to main content

Portal

Contains functions for configuring the destination of a Portal.

info

This module can only be used in Entity scripts.

Functions

setDestination(shortId, target, offline)

Sets the destination for the specified player(s).

Parameters

  • shortId The ID of the world to set as destination.
  • target Either the target Player, client ID of the target player, or Players.All to target all players.
  • offline Determines whether the destination will be an offline instance of the world.

Example

Set a portal to send all the players to SCS HQ when someone activates it.

function onStart()
Portal.setDestination('scs2', Players.All)
end