How do I split a vector value into a bunch of chunks and run code inside there


I need to split the newpos into 12x12x12 chunks and run the code inside the for loop.

local terrain = game.Workspace.Terrain
local region = Region3.new(Vector3.new(-300,-300,-300), Vector3.new(300,300,300)) 
region = region:ExpandToGrid(4)
local material, occupancy = game.Workspace.Terrain:ReadVoxels(region, 4)
local size = material.Size
local LTM = game.ServerScriptService.LegacyTerrainManager
local RunService = game:GetService("RunService")
for x = 1, size.X do
	for y = 1, size.Y do
		for z = 1, size.Z do -- chunks
				local newpos = Vector3.new(x,y,z)
				print(x, y, z)
				LTM.PlaceTerrainBlock:Fire("MegaGrass",newpos)
		end
	end
end

--print("Material at (", x, y, z, "): ", material[x][y][z])
--print("Occupancy at (", x, y, z, "): ", occupancy[x][y][z]) -- 1st val position, 2nd matieral
--local newpos = Vector3.new(occupancy[x],occupancy[y],occupancy[z])```