get hold item||doc135492

September 20, 2022

Format

 Entity:getHandItem() 
  • The class to which the function belongs:Entity

Description

Get the handheld item instance.


Value Returned

type Description
Item Item


Code Samples

on the entity clientmount script, get the handheld item instance, and output its configuration name if it is not empty

local item =  this:getHandItem() 
if item then
   print(item:full_name())
end