Tools
This is a Advanced, Lua related tutorial.
Introduction
This section is a short description of how Tools work in the current version of Roblox. This may be handy to anyone who wants to write their own tools and doesn't care that any such tool may be short-lived due to the rapid development that is occurring in this area.
How Tools Work
Client vs. Server
In a multi-player game, scripts can run in two places: on the client, or on the server. This is not a detail that can be ignored. Making a working tool requires orchestration of both client and server side scripts.
Where Scripts Run
There are now two kinds of scripts in Roblox: Scripts (the regular old kind) and LocalScripts.
- On the Server -
- Scripts run in the Workspace and in all Player Backpacks.
- LocalScripts don't run anywhere except in Backpacks.
- On the Client -
- Scripts run in HopperBins in the local player's Backpack (If I am playing, only the scripts in my backpack run on my machine, I don't run other scripts in other players' packs). We do this only to support legacy weapon scripts. This method of making weapons is deprecated and support may be withdrawn at any time. If you are making new weapons, do not use HopperBins. Regular Script objects don't run anywhere else on the client.
- LocalScripts run only in the local player's backpack and character model.
Solo Games
In any single player mode (solo visit or edit), the client and server are the same machine. As a rule of thumb, if your tool works in multi-player, it will work in solo mode. The converse is not always true.
Relevant Class Documentation
How do I remove tools or weapons from my place?
Tools and weapons that are distributed to players upon entering a ROBLOX world are stored in the StarterPack.
To remove tools or weapons from your place:
- Open your place in "Edit Mode" from ROBLOX Studio.
- Open the Explorer view.
- Select the StarterPack.
- Delete tools or weapons you do not want in the StarterPack.
How to Add Tools to a Map
Please note: This section is completely out of date and needs work.
Tools are items that are usable by Roblox characters. They include tools mainly for fighting. Adding tools to your map is easy. Just open your place in edit mode, an dfollow these steps. When you are done, please visit your place and you should have tools.
Open your place in Roblox Studio
Here you are. Your place. But how do you add tools? Read on to find out!
To find out where the tools are, you first need to find the "Insert" buttom at the top of the screen. Click it.
Select "Tools" from the Toolbox
Now you are in "Insert". Click the "V" button next to "Bricks". A list will go down. Search for tools.
Click the Tool you want to Insert
A message box will pop up and ask whether you want to insert the tool into the StarterPack or into the Workspace. If you insert a tool into the StarterPack, this means that people will get this tool when they enter your map. If you insert the tool into the Workspace, it will lie on the ground until someone picks it up.
Save your work
Remember to save and publish your map.
Another way to add tools
Go to your place in solo mode, then at the top it there should be Insert in a tab click it.
In the top corner of the toolbox (or insert) there is a bar where you can select what section of the toolbox you want. Pick "Tools"
Last Part
Click on the tool you would like to be placed on re-spawn. It should be dropped in the level, just sitting on the ground. In edit mode, go to your explorer, then you should see +Workspace. Click the + sign. Find your weapon (it should start with "Linked", as in "LinkedSword", or "LinkedSlingshot", for example.) Click on the name of the weapon, and you will see a blue box appear around the weapon itself. Click and drag the name of the weapon over to the StarterPack. The weapon will appear in the horizontal tray on the bottom of the screen.
Save
Now that you're finished, exit and save it and there you go! Now go enjoy some building or fighting!