Hello I'm scripting a dealer that gives weapons and I'm trying to script a system that doesn't allow the client to take multiple identical tools at the same time
local player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:connect(function()
if not player.Backpack:FindFirstChild("Coltello") or player.Backpack:FindFirstChild("Beretta 92FS") or player.Backpack:FindFirstChild("Glock 17") then
-- stuff that allows to buy the gun etc
end
end)
the problem is that when a player tries to buy multiple different guns it won't allow it due to the if statement, can anyone help me?

1 comment
You need to make some way to specify what gun exactly are you buying and then only having one if statement, otherwise you will always keep having this problem.