Alright, I'm working on a sort of admin panel, I have a configuration module script though when I try to get a value from it I get the following error:
ServerScriptService.ModPanelSever:6: attempt to index field 'config' (a nil value)
Here is my main script;
local settingsmodule = require(game.ServerScriptService.ModConfiguration) game.Players.PlayerAdded:Connect(function(player) for i,v in pairs(settingsmodule.config.Admins) do print(v) if player.Name == v then local value = Instance.new("BoolValue",player) value.Name = "AdminValue" value.Value = true print("yes") end end end)
Here is the script in the configuration module script;
local config = { Admins = {"mobbySlayin","Pizzafireme"}; -- Everyone you want as a normal admin } return config
I'm not quite sure what I'm doing wrong, any help would be much appreciated!
settingsmodule is the config table, so you are essentially doing config.config.Admins -theking48989987
Basically, you just have to do:
local admins = require(game.ServerScriptService.ModConfiguration).Admins