How exactly would I go upon using table.find() to find a value not equal to it?
if v.ClassName == "Tool" and v.Name ~= table.find(BlackListedWeapons, v.Name) then
print("allowed")
end
How exactly would I go upon using table.find() to find a value not equal to it?
if v.ClassName == "Tool" and v.Name ~= table.find(BlackListedWeapons, v.Name) then
print("allowed")
end
This discussion is preserved as it was. New answers, comments, and votes are closed.
3 comments
table.find gives the number it found something at, and otherwise gives nil. you can basically treat this the same as true or false. so you can replace this with "and not table.find(BlackListedWeapons, v.Name)".
I would just do, and not BlackListedWeapons[v.Name] then.
Could you explain more and show more of your code? What are you trying to do