Doesn't have any errors, at all.

local staff = {"Asperanator"}

local function checkperms() -- Creating the function 'checkperms'
	
for _, member in pairs(staff) do -- Cycles through the table 'staff'
	if member == player.Name then -- Checking if username equals to a name inside the table

print("Access level: HAE Staff")

else
	
print("Access level: Restricted Access - Call's only")

		end
	end
end

panel.MouseButton1Down:connect(function()

checkperms()

end)

4 comments

0

What are you trying to make it do?

0

Check if there is a member in the table and then allow them todo something..

0

Are player and panel defined earlier in the script?

0

Yes.