I have a round based game that I am developing and I use parts for my maps instead of terrain.
I wanted to add grass to my game in some areas and I managed to do that in studio, but for some reason, it doesn’t work when I publish my game.
To do this (and there might be a better way), I made parts where I wanted the grass to be and filled those parts. It works fine in studio, but doesn’t show up in the actual game once I publish it.
This is all in my main script in scriptserverstorage and all the grass parts I am filling in are in three seperate models for block, ball, and cylinder:
local map = baseMap[math.random(1,#baseMap)]:Clone()
map.Name = "BaseMap"
map.Parent = game.Workspace
local grass = game.Workspace.BaseMap:WaitForChild("Grass")
local grasss = game.Workspace.BaseMap:WaitForChild("Grasss")
local grassc = game.Workspace.BaseMap:WaitForChild("Grassc")
for i, v in pairs(grass:GetChildren()) do
game.Workspace.Terrain:FillBlock((v.CFrame - Vector3.new(0,2,0)), v.Size, Enum.Material.Grass)
end
for i, v in pairs(grasss:GetChildren()) do
game.Workspace.Terrain:FillBall(v.Position, v.Size.Y/2, Enum.Material.Grass)
end
for i, v in pairs(grassc:GetChildren()) do
game.Workspace.Terrain:FillCylinder(v.CFrame, 1, 1, Enum.Material.Grass)
end