Why is this not becoming blocky terrain?

I want it to be like mincrafts terrain but it is not working and I dont know why

local WorldProportionX, WorldProportionZ = 100, 100
local NoiseScale = 50
local Height = 5
local PartProportion = 5
math.randomseed(tick())
local MathRandom = math.random()

for Number = -WorldProportionX, WorldProportionX do
	for Number2 = -WorldProportionZ, WorldProportionZ do
		local MathNoise = math.noise(Number / NoiseScale, Number2 / NoiseScale, MathRandom) * Height
		local Part = Instance.new("Part")
		Part.Anchored = true
		Part.CFrame = CFrame.new(Number * PartProportion, MathNoise * PartProportion, Number2 * PartProportion)
		Part.Size = Vector3.new(PartProportion, PartProportion, PartProportion)
		Part.Parent = workspace.Terrain
	end
	wait()
end

Can someone please help

2 Likes

What do you mean by ‘it’s not working properly’, is the terrain that it’s generating bad? Or is the script just not working?

Also make sure this is in a normal script in ServerScriptService.

1 Like

I want it like this;

image

But mine is like:

1 Like

Or in other words my terrain does not look like minecraft

1 Like

The script is working fine but not how it was intended to work is what i mean I want blocky terrain

1 Like

You need to figure out the math involved to place the Part at 5 stud intervals in the Y axis.
It looks like your math for the X and Z axis works well, but it looks like you have the Y axis being set to a .5 stud difference instead of a 5 stud difference.

1 Like

Im not good at math though so i would not know how to do that

1 Like

maybe change
local Height = 5
to
local Height = 50

1 Like

If you are getting a .5 stud step, try multiplying the value in that section of the script line by 10.

2 Likes

Solution:

local WorldProportionX, WorldProportionY, WorldProportionZ = 100, 100, 100
local NoiseScale = 50
local Height = 5
local PartProportion = 3
math.randomseed(tick())
local MathRandom = math.random()

for Number = -WorldProportionX, WorldProportionX do
	for Number2 = -WorldProportionY, WorldProportionY do
		for Number3 = -WorldProportionZ, WorldProportionZ do
			local MathNoise = math.noise(Number2 / NoiseScale, Number3 / NoiseScale, MathRandom) * Height
			local MathNoise2 = math.noise(Number / NoiseScale, Number3 / NoiseScale, MathRandom) * Height
			local MathNoise3 = math.noise(Number / NoiseScale, Number2 / NoiseScale, MathRandom) * Height
			local Density = MathNoise + MathNoise2 + MathNoise3 + Number2
			if Density > 10 and Density < 20 then
				local Part = Instance.new("Part")
				Part.Anchored = true
				Part.CFrame = CFrame.new(Number * PartProportion, Number2 * PartProportion, Number3 * PartProportion)
				Part.Size = Vector3.new(PartProportion, PartProportion, PartProportion)
				Part.Parent = workspace.Terrain
			end
		end
	end
	wait()
end