OnUseItem||doc136890

September 20, 2022

Format

local event = Entity:GetEvent("OnUseItem")

Description

Triggered event when the entity uses item.

Callback function parameters

Type Name Introduction
Entity entity Entity using the item
Item item Item object used

Code Example

local event = Event:GetEvent("OnUseItem")
event:Bind(function(entity, item)
    print(entity.. " use item " .. item)
end)