local apple = script.Parent local CD = apple.ClickDetector CD.MouseClick:connect(function(player) local BP = player.Backpack if BP:FindFirstChild('apple') == false then apple.Parent:Clone().Parent = BP end end)
I have a ClickDetector, and a handle. Not sure where I'm going wrong.
local apple = script.Parent local CD = apple.ClickDetector CD.MouseClick:Connect(function(player) --use :Connect local BP = player.Backpack if BP:FindFirstChild('apple') == nil then --nil not false apple.Parent:Clone().Parent = BP end end)
Rename apple to Handle and the tool to apple
1 local apple = script.Parent 2 local CD = apple.ClickDetector 3 4 CD.MouseClick:Connect(function(player) 5 local BP = player.Backpack 6 if BP:FindFirstChild('apple') ~= nil then --if apple isn't nil the next line will run. 7 apple.Parent:Clone().Parent = BP 8 end 9 end)