Tool¶
Tools are objects that can be held by players.
Inherits Instance
Events¶
Activated¶
Fires when the user clicks while holding the tool.
Example
tool.Activated:Connect(function()
print("Tool has been activated!")
end)
Deactivated¶
Gets fired when the user lets go of the mouse button while holding the tool.
Equipped¶
Fired when the tool is equipped.
Unequipped¶
Fired when the tool is unequipped.
Methods¶
Play → void
¶
Parameters: animationName [ string
]
Plays an animation on the tool or the player that is currently holding the tool.
Example
local tool = script.Parent
tool.Activated:Connect(function()
tool:Play("slash")
end)
You can use the following emotes on these tools: slash
, eat
, and drink
.
Properties¶
Droppable : boolean
¶
Determines whether the tool can be dropped by the player or not.
Example
tool.Droppable = true