please tell im stupid local function onTouch(Part) print("Touch started: " .. Part.Name) numTouchingParts = numTouchingParts + 1 tl.Text = numTouchingParts end
local function onTouchEnded(Part) print("Touch ended: " .. Part.Name) numTouchingParts = numTouchingParts - 1 tl.Text = numTouchingParts end
Part.Touched:Connect(onTouch) if canGive == false then canGive = true local clone = tool:Clone() clone.Parent = Player.Backpack wait(1) canGive = false end
Part.TouchEnded:Connect(onTouchEnded)
Next time use a code block.
Put your tool in ReplicatedStorage.
local tool = ReplicatedStorage.Tool script.Parent.Touched:Connect(function() tool.Clone(). Parent = player.Backpack end
Make sure to find the player as I can't do everything for you. I hope this helps. :)