Skip to content

Checks

Contains a set of functions to check that an item can be used.

Returns true if the item has enough ammo. Returns true if ammo is nil.

NameTypeDefaultDescription
itemItemThe item.

boolean

Returns true if scoped-in on a ScopeRequired item. This only functions the client. Returns true if not ScopeRequired.

NameTypeDefaultDescription
itemItemThe item.

boolean

Returns true if not reloading.

NameTypeDefaultDescription
itemItemThe item.

boolean

Returns true if the specified action is enabled.

NameTypeDefaultDescription
itemItemThe item.
action`“Primary” | “Alternate”The action to check.

boolean

Returns true if the game-phase is valid.

NameTypeDefaultDescription
itemItemThe item.
phasePhaseThe current round phase.

boolean

Returns true if the not firing too quickly.

NameTypeDefaultDescription
itemItemThe item.

boolean

Returns true if the target is within valid distance.

NameTypeDefaultDescription
itemItemThe item.
originVector3The origin of the action.
destinationVector3The target position.
targetBasePart?The target part.

boolean

Returns true if the target is not obscured by static geometry.

NameTypeDefaultDescription
mapMapThe current map.
originVector3The origin of the action.
destinationVector3The target position.
targetBasePart?The target part.

boolean