Hi! I’m trying to use ReplaceMaterial to change terrain from Grass to LeafyGrass inside a specific region defined by a Part. However, nothing changes when I run the code. I’ve double-checked that the terrain in that region is actually Grass, and the script is running on the server.
local part = workspace:WaitForChild("SizePart")
-- Define the region based on the Part's position and size
local min = part.Position - (0.5 * part.Size)
local max = part.Position + (0.5 * part.Size)
local region = Region3.new(min, max):ExpandToGrid(4)
-- Try to replace Grass with LeafyGrass
workspace.Terrain:ReplaceMaterial(region, 4, Enum.Material.Grass, Enum.Material.LeafyGrass)
The cylindrical part is the SizePart.
