PcoWSkbVqDnWTu_dm2ix
Creating Player Tools
Part 1 - Getting Started
Creating Player Tools
Part 1 - Getting Started

Tools are a simple way to manage items that the player can hold in their hand and use in-game. They can range from weapons such as swords to food items.

In this course, you’ll learn how to create a tool in the shape of a laser blaster that will play sound effects when equipped or activated.

Creating the Tool

The Tool object is the basis of any tool in Roblox, so you’ll need to create one. It’s easier to change how tools look by adding objects such as Parts and MeshParts to the tool in the workspace where they are visible.

  1. Insert a Tool into the workspace and name it Blaster.
  2. Insert a MeshPart into the tool.
  3. Set the MeshId property to rbxassetid://92656610.
  4. Set the TextureId property to rbxassetid://92658105

  1. The tool needs a part named Handle for the player to hold. Change the name of the MeshPart to Handle.

Storing the Tool

Tools can be kept in the game world as collectable tools or given to all players as starter tools.

Collectable Tool

The blaster is currently a child of Workspace so it will be collectable. A player can pick up the tool by touching it, causing it to become a child of the character model; the tool will then be equipped and placed in their hotbar.

During gameplay, unequipped tools are stored within the player’s hierarchy in the Backpack and then moved to their character model when equipped. Any tool that becomes a child of a character will be automatically equipped.

Tripmine Unequipped
Tripmine Equipped

Starter Tool

Storing a tool in StarterPack will place it in a player’s Backpack when they join the game or respawn.

  1. Move the Blaster to StarterPack in the Explorer.
  2. Play the game to test the tool. Click on the hotbar at the bottom of the screen or press 1 on the keyboard to equip the tool.

Tool Properties

Position / Orientation

A tool’s position and orientation can be changed using the grip properties. GripPos changes the position of the grip, whereas GripForward, GripRight and GripUp affect the rotation.

Currently the player is holding the center of the blaster instead of the grip.

  1. Set the GripPos property of the tool to 0, -0.4, 1.1.
  2. Click the Play button to test the tool.

Notice how the tool is now being gripped in a different position.

Before
After

Hotbar Icon

By default, the tool name will be displayed on the hotbar icon. It’s good practice to change the icon to be an image of the tool.

  • Set the TextureId property of the tool to rbxassetid://92628145.
Before
After

Tooltip

A tooltip is a small text description that appears when the mouse hovers over a tool in the hotbar. They typically include the name of the tool and/or a brief description of its function.

  • Change the ToolTip property to Blaster.

Next Page Using Scripts with Tools