I am making offices for my game for the HR ranks, i have a table of whitelisted people which can be added to by a gui, my problem is this bit of code here:
for i,v in pairs(owner) do
script.Parent.Parent.unauthkill.Touched:Connect(function(tch)
if tch.Parent:FindFirstChild("Humanoid") then
if tch.Parent.Name ~= v then
tch.Parent:FindFirstChild("Humanoid").Health = 0
end
end
end)
this is supposed to kill anyone who isn't in the table "owners" (whitelisted) but insted, if there are two people in the table, let's say "PersonA" and "PersonB", PersonA wil be fine but the script will kill "PersonB" because in the eyes of the script, PersonA is not PersonB
Does anyone know how to make it check all users of a table first and then take action? If you do I would be great full if you could help :)

1 comment
check below