Why isn't air being changed to the specified material?


Hey there, I have a plugin I recently made called Terrain Converter. I am trying to add a grow tool option, however, I am unable to override air voxels?

Here is my code:

			elseif mode == 'grow' then
				if materials[x][y][z] == materialsDictionary[mat1.Value] or materials[x][y][z] == Enum.Material.Air then
					materials[x][y][z] = materialsDictionary[mat2.Value]

This doesn’t override air voxels even though I am allowing it too. Is there something special I have to do for air voxels?


You will also need to set voxel occupancy. You are currently only setting material, not how much of the voxel is occupied by that material.

See read/writeVoxels


Thank you!