There’s an API function for that called ReplaceMaterial, however, using this will also put water below the sand. If that’s a problem, you will probably need to use ReadVoxels and WriteVoxels.
Terrain:ReplaceMaterial()
1 Like