Skip to content

Teleporter

Teleports the player to a random TeleporterDestination of the same TeleporterId.

Teleporter = {
-- Attributes
Cooldown: std.Attribute<boolean>,
KeepVelocity: std.Attribute<boolean>,
PlaySound: std.Attribute<boolean>,
Seamless: std.Attribute<boolean>,
SeamlessMeasurement: std.Attribute<SeamlessMeasurement>,
SeamlessOverflow: std.Attribute<boolean>,
TeleporterId: std.Attribute<string>,
Activatable: std.Attribute<boolean>,
ActivationBehavior: std.Attribute<ActivationBehavior>,
}
Teleporter.Cooldown: std.Attribute<boolean>

Defines the cooldown period in seconds after a Teleporter has been activated, before it can be used again.

Teleporter.KeepVelocity: std.Attribute<boolean>

Whether the player should retain the velocity they were at prior to entering the teleporter.

Teleporter.PlaySound: std.Attribute<boolean>

Whether this should play a sound effect when teleported.

Teleporter.Seamless: std.Attribute<boolean>

Whether the player should keep their relative CFrame to the center of the teleporter prior to teleporting. For example, if the player activated the teleporter from the bottom northwest of the teleporter, the player will end up in the bottom northwest of the destination.

Teleporter.SeamlessMeasurement: std.Attribute<SeamlessMeasurement>

The proportions used to calculate the teleport if Seamless is enabled. Relative proportions use percentage proportions of the Teleporter and the TeleporterDestination. World proportions use studs of the Teleporter and the TeleporterDestination

Teleporter.SeamlessOverflow: std.Attribute<boolean>

Whether a teleport can exceed the bounds of the TeleporterDestination when Seamless is enabled.

Teleporter.TeleporterId: std.Attribute<string>

The group of teleporter destinations to pick randomly and teleport to.

Teleporter.Activatable: std.Attribute<boolean>

Whether this object can be activated. See the Activation page.

Teleporter.ActivationBehavior: std.Attribute<ActivationBehavior>

How should this object be activated. See the Activation page.

export type SeamlessMeasurement = "Relative" | "World"

The proportions used to calculate the teleport if Seamless is enabled. Relative proportions use percentage proportions of the Teleporter and the TeleporterDestination. World proportions use studs of the Teleporter and the TeleporterDestination