I want to create a system like @wind_o’s CheckMeIn but it seems that my type checking script isn’t working.
(If not type:lower() == 'standard' and 'enterprise' then)
return function(type, allowed)
if type:lower() == 'enterprise' then
require(script.Enterprise)(allowed)
end
if type:lower() == 'standard' then
require(script.Standard)(allowed)
end
if not type:lower() == 'standard' and 'enterprise' then
print('Invalid System Type')
end
end
not has higher precedence over == so this is what you want:
type = type:lower() -- Instead of calling lower for each case insensitivity comparison just do it once
if type ~= "standard" and type ~= "enterprise" then
end
Kind of. The issue with your script was since not has higher precedence, it evaluated to (not type:lower()) == 'standard' which is the same as false == 'standard' which always evaluates to false. So just remove the not and replace == with ~=.