This is my script so far, it can be spammed for infinite tools, how do I make it so that if the player already has said tool, it isn't given to the player?
plr = game.Players.LocalPlayer tool = game.ServerStorage["Knife"] script.Parent.MouseButton1Down:connect(function() tool:clone().Parent = plr.Backpack end)
Thanks!
Use FindFirstChild to check for the tool.
plr = game.Players.LocalPlayer tool = game.ServerStorage["Knife"] script.Parent.MouseButton1Down:connect(function() if plr.Backpack:FindFirstChild("Knife") == nil then tool:clone().Parent = plr.Backpack else return end end)
Something like this I think