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

RequiresHandle

Tool

bool

The RequiresTool property determines whether a Tool functions without a handle.

A tool has a handle when it has a child part named “Handle”. Tools without handles are typically ones that do not require the player equipping them to hold anything to use them. For instance, handles may not be necessary for fly or build tools. Tools with handles are typically ones that require the player equipping them to hold an object to use them. For instance, handle are likely necessary for weapons such as guns and swords.

When set to true, the tool will function and be Tool/Activated|activated and Tool/Deactivated|deactivated without a handle.

When set to false, the tool will not function without a handle.


Code Samples


Does a Tool Require a Handle

The code sample below prints "This tool requires a handle!’ when the tool requires a handle to function, and "This tool does not require a handle!’ when the tool does not require a handle to function.

In order for code to function as expected, the tool variable must be set to a Tool instance in the game or in a Player|Player's Backpack.

Although this example demonstrates how to determine the value of the Tool/RequiresHandle property, the property is usually set manually within Studio mode when you create a tool, rather than via a script.