PcoWSkbVqDnWTu_dm2ix
The Developer Hub is now deprecated and information on this page may no longer be accurate. To see our new and improved documentation, please click here. You can read more about the future of documentation here.
Collapse Sidebar

Enabled

Tool

bool

The Enabled property relates to whether or not the Tool can be used. This is useful if you want to prevent a player from using a tool, but do not want to remove it from their Backpack.

When set to true, the tool can use the tool.

When set to false, the tool is disabled and the player cannot use the tool. It prevents the tool from being activated or deactivated by the Tool/Activate and Tool/Deactivate functions. It also prevents the Tool/Activated and Tool/Deactivated events from firing for the tool.


Code Samples


Superjump Tool

The code sample below creates Tool in the Players/LocalPlayer|LocalPlayer's Backpack that increases the player’s Humanoid/JumpPower|JumpPower from 50 to 150 for 5 seconds.

This example uses the tool’s Tool/Enabled property as a debounce by setting the property to true when the player begins sprinting and to false when the player stops sprinting. As a result, the tool cannot be activated to extend the duration of the SuperJump buff until after the 5 second duration ends.

Unequipping the tool also stops the player from super jumping by changing the JumpPower back to 50.