Click to Pickup

Click to Pickup

Where to put this script

Script

local tool = script.Parent.Parent
local click = script.Parent.ClickDetector

local function pickup(player)
  tool.Parent = game.Workspace[player.Name]
end

click.MouseClick:Connect(pickup)