Hello, I have a script that will give a pistol. However, I do not want infected players to be able to access the tool, I only want Humans to be able to. There are 2 teams. "Humans" and "Infected" How can I make the script to only give the tool to "Humans"?
Here is the script
local tool = game.ServerStorage.Pistol -- Pistol is the item
local clone = tool:clone()
script.Parent.ClickDetector.MouseClick:Connect(function(plr)
if clone.Parent ~= plr.Backpack then
clone.Parent = plr.Backpack
else
end
end)

1 comment
if plr.Team.Name == "Humans" then should do the trick