Hi :), I made an tool giver, but I want that the player only has one of each tool (in this case a knife). I tried multiple things, but never worked. Someone that can help me?
this is the script of the tool giver with clickdetector
function hi(x) local y = x.Backpack local z = game.Lighting["Knife"] z:Clone().Parent = y end script.Parent.ClickDetector.MouseClick:connect(hi)
function hi(x) local y = x.Backpack if y:FindFirstChild("Knife") or x.Character:FindFirstChild("Knife") then return end local z = game.Lighting["Knife"] z:Clone().Parent = y end script.Parent.ClickDetector.MouseClick:connect(hi)