How to make a button when clicked to equip a tool/gear

Hello! :smile:

  1. First create a part in your workspace and add a click detector
    For example, this is from my game
    image

  2. Add this script

local tool = game.ServerStorage[“Milk Tea”]
local klone = tool:clone()
script.Parent.ClickDetector.MouseClick:connect (function(plr)
if klone.Parent ~= plr.Backpack then
klone.Parent = plr.Backpack
else
end
end)

  1. I added a surface gui to name the button what I wanted which is “Milk Tea” in this case

  2. The important step you need to place your tool with the handle into ServerStorage
    It should look something like this with the name matching to the name in the script
    image

There you go!
Just follow these simple steps and you made your button that will give whatever tool/gear you need in your game!

Thanks guys! :wink:

11 Likes

This topic was automatically closed after 1 minute. New replies are no longer allowed.