So Im trying to make like a system where u can steal a soccer ball from somebody. So player 1 has the ball, and then player 2 walks up to player 1 and touches the ball. What I want to happen when player 2 touches the ball is: (the ball is a tool) I want player 1 to lose the tool (the ball) and player 2 to recieve the tool. But i dont know how. Here is what ive got so far:
script.Parent.Touched:connect(function(player)
if player:FindFirstChild("Humnaoid") then
for _,v in pairs(game.Players:GetPlayers()) do
v.Backpack:ClearAllChildren()
wait (0.1)
ball:clone().Parent = player.Backpack
end
end)
Please help or tell me what I can do to improve the code! Also:
Hierarchy
ServerStorage
Ball
TheScript
(SerpentineKing you might remember this)

2 comments
So I replace the server script i already had before, with this one just above this comment? And the Revised Code script I put in the handle of the ball?
Also you forgot to do the Handle variable in the Revised Code script :) thats fine tho