Handle Items Event
The inventory:usedItem
event is triggered whenever a player uses an item from their inventory. You can use this event to implement custom logic for specific items.
Event Structure
Parameters
itemName
: The name of the used item (string)....
: Additional parameters if the item sends extra data.
Basic Example: Detect Specific Item Use
Implementation Steps
Place the code in a server-side Lua file.
Match the item name (
itemName
) to your inventory items.Add any custom functionality as needed.
This event is a simple and effective way to extend your inventory system with custom item logic.
Last updated
Was this helpful?