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:
01 | local block = script.Parent.Grass |
02 | local function GetBlock() |
03 | return block:Clone() |
04 | end |
05 | local function GetSize() |
06 | return block.Size.z |
07 | end |
08 | -- Assing random position ranges |
09 | local x_min, x_max = - 100 , 100 |
10 | local z_min, z_max = - 100 , 100 |
11 | local y_min, y_max = 1 , 10 -- this is in block units. |
12 | for x = x_min, x_max, GetSize() do |
13 | for z = z_min, z_max, GetSize() do |
14 | local height = math.random(y_min, y_max) |
15 | for y = GetSize()/ 2 , GetSize() * (height + 0.5 ), GetSize() do |
This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.
Why was this question closed?
1 | local block = GetBlock() |
2 | block.CFrame = CFrame.new(x,y,z) |
3 | block.Parent = game.Workspace |
That will not work because it returns a number. You cannot change a number's CFrame/Parent.
what exactly is the problem ?