Change terrain in radius

I want to make it where terrain material within a certain radius of a block is changed to another.

I tried using Replace Material but it requires two blocks to do that and then I end up with a “Region has to be aligned to the grid” error.

I’m not really sure what you mean but this is what I think you’re trying to say.

1 Like

Terrain works on the voxel grid, specifically a resolution of 4 (hence why you pass it into ReplaceMaterial currently).

You just need to expand the Region3 to this grid with the ExpandToGrid method.

ie.

local region = Region3.new( --[[ Code ]] );
region:ExpandToGrid(4);

--// Now you can use it with ReplaceMaterial