I am trying to create a script within a part that when the part is touched, will clone a tool from within the workspace and put it in the players backpack. Any help is appreciated, thanks in advance!
Here is the script I have came up with that is not working:
local tool = game.Workspace.FryingPan
local player = game.Players.LocalPlayer --finds the script's parent, the player.
function Touch(hit)--when clicked, function
tool:Clone() --clones tool
tool:Clone().Parent = player.Backpack --has the cloned tool's parent the player's Backpack
end
script.Parent.Touched:Connect(Touch)
