Kartik Scripts

EnterProperty

exports['kartik-properties']:EnterProperty(propertyId, bypassDistance)

๐Ÿ”น Description

Walks the local player into a property's interior (shell or IPL), using the same enter flow as the door. Useful for spawn selectors, phone apps, or scripted teleports.

The server still runs every access check (ownership, keys, lease, lock state). This export only asks for the entry; it does not grant access.


๐Ÿ”ง Parameters

NameTypeRequiredDescription
propertyIdnumber | stringโœ…Property id (kp_properties.id).
bypassDistancebooleanโฌœtrue skips the "standing at the door" distance check. Access and lock checks still apply.

๐Ÿ“ค Returns

None. The result is shown to the player as a notification if entry is refused.


๐Ÿง  Example Usage

-- Spawn selector: put the player straight inside their home
exports['kartik-properties']:EnterProperty(12, true)

๐Ÿ“Œ Notes

  • Walk-in properties have no instanced interior. Their "inside" is the real map, so move the player to the entrance instead.
  • When entry finishes, the client fires kartik-properties:client:enteredProperty.

On this page