Want a special badge and 30 bux? Make some PolyWorld! Content and post it in the Creations forum!
Dark mode is incomplete! Please report any issues to the Discord.

Tool

Scripts

Tools are Items players can equip and use.
They often live under StarterItems and are given to players when they join or respawn.

Inherits Instance.


Overview

Properties

Methods

Also inherits Instance methods.

Events


API

Properties

Enabled

Enabled : bool
When false, the Tool cannot be equipped or used.

RequiresHandle

RequiresHandle : bool
When true, the Tool expects a child Part named Handle.

GiveOnJoin

GiveOnJoin : bool
When true (the default), players receive this Tool in their backpack when they join or respawn.
Uncheck it in Studio, or set it false in XML (<giveOnJoin>false</giveOnJoin>), to keep the Tool in StarterItems without giving it automatically.
Scripts can still grant it later with `Player:GiveTool`.
Place starter tools and GiveTool are not affected by catalog gear genre flags (workspace.AllowMelee, AllowRanged, AllowDestructive, AllowStealth, AllowBuilding, AllowConsumable). Those only filter catalog gears equipped in the avatar editor.

Preset

Preset : string?
Built-in preset name when this Tool comes from a Studio preset, or nil.

preset

preset deprecated : string?
Identical to Preset.
No longer recommended for use.

Methods

Activate

Activate() : void
Runs the Tool's activate behavior as if the player used it.

Deactivate

Deactivate() : void
Ends an active use of the Tool.

Events

Equipped

Equipped : Event (player: Player)
Triggers when a player equips the Tool.

tool.Equipped:Connect(function(player)
    player:Notify("Equipped " .. tool.Name)
end)

Unequipped

Unequipped : Event (player: Player)
Triggers when a player unequips the Tool.

Activated

Activated : Event (player: Player)
Triggers when the Tool is used.

Deactivated

Deactivated : Event (player: Player)
Triggers when an active use of the Tool ends.