To do this via a local GUI, you must use the server so that you have the tool for all clients/server.
You will need a localscript, RemoteEvent in replicatedStorage, and a script in serverScriptService.
The localscript should look like this:
1 | local textbox = script.Parent.Parent.TextBox |
4 | script.Parent.MouseButton 1 Click:connect( function () |
5 | local toolName = textbox.Text |
6 | game.ReplicatedStorage.cloneGear:FireServer(toolName) |
This is the server side script
1 | game.ReplicatedStorage.cloneGear.OnServerEvent:Connect( function (plr, toolName) |
2 | local tool = plr.Backpack:FindFirstChild(toolName) |
4 | local newTool = tool:Clone() |
5 | newTool.Parent = plr.Backpack |
To change it to search in server storage, change the 2nd line of server side, changing it to
1 | |Location|:FindFirstChild(toolName). |
Hope this helps :)