I got an answer from my question on 'Generation' about generating blocks. But is there anyway to fix this? OR understand some of it so ** I ** can fix it? It doesn't connect and stuff you can try it:
local block = script.Parent.Grass
local function GetBlock()
return block:Clone()
end
local function GetSize()
return block.Size.z
end
-- Assing random position ranges
local x_min, x_max = -100,100
local z_min, z_max = -100, 100
local y_min, y_max = 1,10 -- this is in block units.
for x = x_min, x_max, GetSize() do
for z = z_min, z_max, GetSize() do
local height = math.random(y_min, y_max)
for y = GetSize()/2, GetSize() * (height + 0.5), GetSize() do
local block = GetBlock()
block.CFrame = CFrame.new(x,y,z)
block.Parent = game.Workspace
end
wait() -- due the amount of recurses; wait, otherwise roblox will crash
end
end`

1 comment
Include a valid description. Simply saying "What exactly is the problem" is not a valid answer, and should be written as a comment INSTEAD of an answer.