Skip to content

Item

The item class represents an instance of an item. Components are initially replicated from the server to the client when an item is picked up, but subsequent changes to components on the server will not replicate until the item is picked up again. Changes to components on the client-side will be lost when the item is dropped.

Type: "Item"

Always set to “Interactable”. Used to differentiate between classes.

Type: {[any]: any}

Used to store additional information about the item.

Type: ItemComponents

The base item components used by this item.

Type: ItemComponents

Stores the per-item components.

Retrieves the data that will be sent to the server.

NameTypeDescription
action"Primary" | "Alternate"The firing action to retrieve data for.

unknown

Sets data to be sent to the server.

NameTypeDescription
action"Primary" | "Alternate"The firing action to set data for.
dataunknownThe data to set.

Resets the last use time for the specified action, bypassing the cooldown.

NameTypeDescription
action"Primary" | "Alternate"The firing action to set data for.