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

ManualActivationOnly

Tool

bool

The ManualActivationOnly property controls whether the Tool can be activated without explicitly executing Tool/Activate in a script.

When set to true, the tool will only fire Tool/Activated when Tool/Activate is called. This also suppresses the ContextActionService’s ContextActionService/BindActivate function.

When set to false, mouse clicks (when the tool is equipped) will also fire Tool/Activated.


Code Samples


Sprint Tool

The code sample below creates Tool in the Players/LocalPlayer|LocalPlayer's Backpack that increases the player’s Humanoid/Walkspeed|WalkSpeed from 16 to 30 for 5 seconds.

This example uses the tool’s Tool/ManualActivationOnly 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, when the player is sprinting the tool cannot be activated by pressing the left mouse button.

Unequipping the tool also stops the player from sprinting by changing the WalkSpeed to 16.