Here’s an example of using Terrain from workspace:
local Terrain = workspace:WaitForChild("Terrain")
local Region = Region3.new(Vector3.new(0, 0, 0), Vector3.new(50, 20, 50))
local Material = Enum.Material.Grass
terrain:FillRegion(Region, 30, Material)
30 is strength of Grass that has to be applied.
Region is the place where Terrain has to be placed.
Material can be any Enum.Material