Kartik Scripts

IsPlayerInProperty

exports['kartik-properties']:IsPlayerInProperty(src)

🔹 Description

Returns the id of the property a player is currently inside, or nil if they are not in any property interior. Useful for scripts that need to gate behaviour on whether a player is indoors (e.g. dispatch suppression, offline raids, activity checks).


🔧 Parameters

NameTypeRequiredDescription
srcnumber✅The player's server id (source).

📤 Returns

TypeDescription
numberThe property id the player is inside.
nilIf the player is not currently inside a property.

🧠 Example Usage

local propertyId = exports['kartik-properties']:IsPlayerInProperty(source)
if propertyId then
    print(('Player is inside property #%d'):format(propertyId))
end

On this page