Issues with using tables in module scripts

Trying to make it so that my module script will store settings and different arresting information while my server script will handle that data through a loop, however, I am experiencing errors in my method. Here is the module script:

Module Script

local module = {
    {Name = "245(a)(1) PC Assault with a Deadly Weapon",Time = 20},
    {Name = "187 PC First Degree Murder",Time = 25},
    {Name = "187 PC Second Degree Murder",Time = 20},
    {Name = "374.3 PC Illegal Waste Dumping",Time = 5},
    {Name = "404.6 PC Inciting a Riot",Time = 15},
    {Name = "404 PC Rioting",Time = 10},
    {Name = "408 PC Unlawful Assembly",Time = 5},
    {Name = "487(d)(1) PC Grand Theft Auto",Time = 5},
    {Name = "530.5 PC Identity Theft",Time = 5},
}
print(table.concat(module))
return module

Server Script

require(script.Parent.ArrestSettings)

If you can find solutions, I would be grateful.

table.concat is only capable of concatenating strings and numbers. You are going to have to do something like

for _, t in ipairs(module) do
    for key, value in pairs(t) do
        print(key, "=", value)
    end
end
1 Like

I don’t think that works. I am receiving an error.image

EDIT: Actually, silly me. I edited the wrong script. It works.

Thanks a lot, incapaz.