local item = player.Character:FindFirstChild(item)
if item.Name == "Cuffs" or "Staff Card" then
player:Kick("Do not give other players rank tools.")
else
item.Parent = game.Players[target].Backpack
end
COMMUNITY QUESTION
This script is supposed to kick a player only if they do something but it kicks them every time?
2 answers
On line 2 you need to add another "item.Name ==" after the 'or'.
local item = player.Character:FindFirstChild(item)
if item.Name == "Cuffs" or item.Name == "Staff Card" then
player:Kick("Do not give other players rank tools.")
else
item.Parent = game.Players[target].Backpack
end
There is also another issue surrounding this security system. Since you are looking into the Player's Character Model for the items, you will not be able to kick them until they have equipped the Cuffs or Staff Card. Therefore I would recommend auto-equipping items right after giving them, and this will prevent "corrupt guards" from passing it on further without your realization.
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
or "Staff Card" will always return true, you need to do if item.Name == "Cuffs" or item.Name == "Staff Card" then
Usually I can work around that but thank you.
no problem