The Tool object acts as a weapon or other object that is stored in a Player's Backpack. When equipped, a tool is automatically transferred to the Player's character and it is held in the right hand by default.
Tools require scripting and a part named Handle in it to function properly. This disadvantage of the Tool leads users to use HopperBins instead, as they do not require a part named 'Handle'.
If you insert an Instance whose name is RobloxBuildTool into a Tool, a GUI will not appear where Tool GUIs normally appear. There will also not be a shortcut key to the Tool.
Tools are positioned using the Grip* properties. These actually correspond to a CFrame. To convert from tool positioning into a CFrame:
local up = tool.GripUp
local right = tool.GripRight
local forward = tool.GripForward
local pos = tool.GripPosition
local CFrame = CFrame.new(
-- Position
pos.x, pos.y, pos.z,
-- Rotation matrix
right.x, up.x, forward.x,
right.y, up.y, forward.y,
right.z, up.z, forward.z
)
Returns a clone of the object and its children, unless its Archivable property is false. The clone will have the same properties as the original object and the same descendants (except those with an Archivable property set to false). The clone's Parent will be nil.
Returns the first child found with a name of name. Returns nil if no such child exists. If the optional recursive argument is true, will recursively descend the hierarchy while searching rather than only searching the immediate object.
If true, when the backspace button is pressed the tool will be parented to the workspace and removed from the player's backpack. If false, when the backspace button is pressed the tool will go back to the Player's Backpack.
The name of the object, which is often used to identify it in the context of its parent. Note that names are not unique identifiers; multiple children of an object may share the same name. In a script where you want to access an object using a name, for example, game.Workspace["Brick"], the first object found with that name is that object. This "first object" can be found in the Explorer menu.Names are great for showing a very brief title or summary of an object.
The hierarchical parent of the object. When no scripts hold references to an object, it will still be maintained as long as it's parent is set to an object which does have references to it, either by other objects or scripts. The toplevel DataModel object (the one referred to as the "game" by scripts) has no parent, but always has a reference held to it by the game engine, and exists for the duration of a session.
A unique string per type of Instance. Should only be used as a unique identifier, as it does not reveal any information about nature of the type hierarchy the type is in. For this use, see IsA.