|
| 03 Jan 2015 12:00 AM |
I am making a gui that lets you equip tools. It will function the same as the roblox default toolbar. However, I do not know how to equip the tool on a player through script. I know there is an equipped event, but I do not know how to force the player to equip it.
What is the logic behind this? (unequip as well) |
|
|
| Report Abuse |
|
|
|
| 03 Jan 2015 12:00 AM |
| player.Character.Humanoid:EquipTool(tool) |
|
|
| Report Abuse |
|
|
|
| 03 Jan 2015 12:01 AM |
| you can just parent the tool into their character |
|
|
| Report Abuse |
|
|
|
| 03 Jan 2015 12:01 AM |
Wait wait wait, that's it?
Maybe I had to search harder in the method list. |
|
|
| Report Abuse |
|
|
|
| 03 Jan 2015 12:02 AM |
@prez
I have attempted that, it does not function the same. |
|
|
| Report Abuse |
|
|
|
| 03 Jan 2015 12:03 AM |
player = game.Players.LocalPlayer;
function equip(tool) tool.Parent = player.Character end
function uneuip(tool) tool.Parent = player.Backpack end
equip(thetool) wait(1) unequip(player.Character:findFirstChild(thetool.Name)) |
|
|
| Report Abuse |
|
|