It only generates grass spires i dont see why it is not working
my script:
--Static variables local prefabs = game.ServerStorage.Prefabs local cubes = 90 local width = 10 local length = 10 local height = 5 local x = -0.5 local y = 1.5 local z = 1.5 local rows = 1 local w = 0 local l = 0 local h = 0 local chance = 0 math.randomseed(tick()) --Void function DrawBlock(block, xp, yp, zp, location, num) if num == "" then local newBlock = prefabs[block]:Clone() newBlock.Parent = location newBlock.Size = Vector3.new(2,2,2) newBlock.CFrame = CFrame.new(xp,yp,zp) else local newBlock = prefabs[block]:Clone() newBlock.Parent = location newBlock.CFrame = CFrame.new(xp,yp,zp) newBlock.Size = Vector3.new(2,math.random(3,10),2) end end for i=1,width,1 do for i=1,length,1 do wait() if w==width then w=0 rows=rows+1 x=x-3 z=1.5 print(l) l=l+1 elseif l == length and h ~= height then w=0 l=0 z=1.5 y=y-3 x=0.5 for i=1,width,1 do for i=-1,length,1 do for i=1,height,1 do wait() if w==width then w=0 rows=rows+1 x=x-3 z=1.5 print(l) l=l+1 elseif l == length then print(h) h=h+1 w=0 l=0 x=1.5 z=0.5 y=y-3 elseif h == height then break else chance = math.random(0,3) if chance < 1 and chance > 0.6 then DrawBlock("Copper",x,y,z, workspace.World, "") elseif chance < 1 and chance > 0.5 then DrawBlock("Stone",x,y,z, workspace.World, "") end w=w+1 z=z+(-3) end end end end repeat wait() until h == height break else chance = math.random(0,3) if chance < 0.15 then DrawBlock("Grass",x,y,z, workspace.World, chance) elseif chance < 1 and chance > 0.5 then DrawBlock("Stone",x,y,z, workspace.World, chance) end w=w+1 z=z+(-3) end end end