Right now, I have all grass as terrain but I want to convert all of it to snow without painting it slowly so I found this script tot change it but I'm not sure how to make this convert all the grass on the entire map.
local min = Vector3.new(-20, -20, -20) local max = Vector3.new(20, 20, 20) local materialToReplace = Enum.Material.Grass local replacementMaterial = Enum.Material.Snow workspace.Terrain:ReplaceMaterial(Region3.new(min, max), 4, materialToReplace, replacementMaterial)
I got it to work, like this:
local center = Vector3.new(0, 0, 0) local size = Vector3.new(500, 500, 500) local materialToReplace = Enum.Material.Grass local replacementMaterial = Enum.Material.Snow workspace.Terrain:ReplaceMaterial(Region3.new(center, size), 4, materialToReplace, replacementMaterial)
the Region3.new() function first argument is the center of the region, and the second argument is the size of the region.
Also, you can already do what this script does inside studio. inside the terrain editor window, go to the edit tab, and select "Replace".