When I run this code in my script, it prints Kills kills as the only things in the table and when I run checkStat("Points") it returns nil. It is part of a bigger script.
function checkStat(static)
types={"Kills";"Deaths";"Points";"Demerits";"Promotion"}
local check=static:lower()
for i,v in pairs(types) do
print(v)
if v:lower():sub(1,check:len())==check then
return v
else
return
end
end
end

1 comment
Thank you