Equip

Constructor:

Equip()

Description

Triggered when the tool object itself is equipped.

Examples

Manually add a tool in WorkSpace and add the following script under the tool.

local curTool = script.Parent
local part = RWObject.Create("Part") -- create a part
part.Position = Vector3.New(2,1,2)
part.Parent = WorkSpace
part.CollisionEnter:Connect(function(hit) -- make the avatar equipped with the tool when touching the part.
  if hit:IsClass("Avatar") then 
     hit:EquipTool(curTool) -- equip the avatar with the created tool
  end
end)
curTool.Equip:Connect(function() -- register the event that the tool is removed to the tool
    print("The event that the tool is equipped is triggered")
end)