So i scripted a scripted a script where it takes the blocks in this generated model and changes it to a specific terrain type according to the color but it doesn't work please hlep
local parts = workspace.Yes:GetChildren()
print(#parts)
for i=1,#parts do
if parts[i].color.Value == "Grime" then
print("ok")
local sizer = parts[i].size
local pos = parts[i].CFrame game.Workspace.Terrain:FillBlock(pos,sizer,Enum.Material.Grass)
elseif parts[i].color.Value == "Sand blue" then
local sizer = parts[i].size
local pos = parts[i].CFrame game.Workspace.Terrain:FillBlock(pos,sizer,Enum.Material.Water)
end
end
the print in line 5 dosent print anything

1 comment
I edited my answer. You need to use "v" instead of "i"