Hi! So I am using a Module Script Dictionary to list my Staff and their information for command purposes. But then the errors come in, attempt to index nil with 'Group'
I know what the error means but I need help with fixing it.
Thanks!
The Command Permission Check
local staffList = require(game:GetService("ReplicatedStorage"):WaitForChild("staffList"))
if (context.Name == "kick") then
if (staffList[context.Executor.UserId].Group ~= context.Group) then
return "NO PERMISSION"
end
end
The Staff List (a module script)
local list = {
{
Username = "Boop_xy",
UserID = 995959318,
Group = "Owner"
}
}
return list