I have been trying to do ModuleScripts, but they aren't working, mostly because I don't know how to use them, but here is the script;
wait(0) permadmins = {} tempadmins = {} banned = {} local findModule=game.ReplicatedStorage:FindFirstChild("AdminSettings", true) if findModule then ModuleAdmin=require(findModule) Perm = ModuleAdmin.PermAdmins Temp = ModuleAdmin.TempAdmins Banned = ModuleAdmin.Bans elseif not findModule then permadmins = {"TheeDeathCaster","TheAlphaStigma"} tempadmins = {"Blank"} banned = {"LordByte"} end for i , v in paris(Perm["Perms"])do table.insert(permadmins, v) end for i, v in pairs(Temp["Temps"])do table.insert(tempadmins, v) end for i ,v in pairs(Banned["Banned"])do table.insert(banned, v) end
And here is the ModuleScript;
local PermAdmins = {["Perms"]={"Kohltastrophe","TheeDeathCaster","TheAlphaStigma","Player1"}} local TempAdmins = {["Temps"]={"Blank"}} local Bans = {["Banned"]={"LordByte"}} return PermAdmins and TempAdmins and Bans
Here is the error: - ServerScriptService.Script:12: attempt to index global 'Perm' (a nil value) 21:46:53.430 - Stack Begin 21:46:53.431 - Script 'ServerScriptService.Script', Line 12 21:46:53.433 - Stack End -