- What do you want to achieve? Keep it simple and clear!
I want to, using a moderation system modulescript im making, insert a table using a function into the module script on the server to set admins.
- What is the issue? Include screenshots / videos if possible!
Its quite hard to explain and I dont even know what the issue is, no errors, and my print statement debugging only shows 1 value.
Here is the function in the module script
function ModService:SetAdmins(admins)
if type(admins) == "table" then
for i,_ in pairs(admins) do
table.insert(admintable,admins[i])
return admintable -- thats there because debugging, admintable is a predefined variable, i just haven't shown it here
end
else
warn("function ModService:SetAdmins() arguement 1 is a "..type(admins)..", not a table")
end
end
Here is the server script:
local ModerationService = require(game.ReplicatedStorage.ModerationService)
local myAdmins = {
1274272423,
5052029921
}
local test = ModerationService:SetAdmins(myAdmins)
print(test)
This is the output
-
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Nothing worked.