GetItem
Get data of an item by the player
Argument | Data Type | Needed | Default | Description |
---|---|---|---|---|
id | number | - | ||
Item | string | - | The item name |
Dont need to be called every frame
Returns
Child | Data Type | Description |
---|---|---|
name | string | Item name |
count | number | Item count |
label | string | Item label |
weight | number | Item weight |
usable | boolean | Whether or not the item is usable |
rare | boolean | Whether or not the item is rare |
canRemove | boolean | Whether or not the item can be thrown |
Example
local itemData = GetItem(source, "bread")
local itemData = GetItem(source, "bread")
-- itemData.name = "bread"
-- itemData.count = 1
-- ...
Last update: October 31, 2022
Created: June 27, 2021
Created: June 27, 2021