Please help with write/read voxels

I’m not even gonna try to follow the format, because everything with scripting terrain is awful.

Anyways here’s the script I have so far

function ReturnRegion()
	local ClearTerrainIndex = {
		["City"] = {
			["Max"] = {28.7699738, 22.2225075, 4392.28027},
			["Min"] = {-195.750031, -12.6074896, 4173.27051},
		};
	};
	
	local Index = ClearTerrainIndex["City"];
	local Region = Region3.new(Vector3.new(Index.Min[1], Index.Min[2], Index.Min[3]), Vector3.new(Index.Max[1], Index.Max[2], Index.Max[3])):ExpandToGrid(4);
	local materials, occupancies = workspace.Terrain:ReadVoxels(Region, 4);
	return {Region, materials, occupancies};
end;

workspace.Terrain:Clear();
workspace.Terrain:WriteVoxels(ReturnRegion()[1], 4, ReturnRegion()[2], ReturnRegion()[3]);

It clears the terrain, has no errors, but never actually pastes the region back. Please help.