Try this
local cfg = {
topLeft = Position(1, 1, 1),
bottomRight = Position(2, 2, 2)
}
--
local playersTable = {}
local storageKey = 123456
for z = cfg.topLeft.z, cfg.bottomRight.z do
for y = cfg.topLeft.y, cfg.bottomRight.y do
for x = cfg.topLeft.x, cfg.bottomRight.x do...