I’m making a perlin noise system and i want the higher parts to be a different colour but i have it so it’s pretty rare which i don’t want, i’d like it to be way more common.
What i want:
Code:
f.Parent = game.Workspace
local TileSize = math.random(1,50)
local Smoothness= math.random(2,15)
local Size = math.random(50,80)
local Frequency = math.random(10,60)
local Altitude = math.random(100, 250) -- Culprit
local Colours =
{
Color3.new(math.random(0,255),math.random(0,255),math.random(0,255)),
Color3.new(math.random(0,255),math.random(0,255),math.random(0,255))
}
for x = 1, Size do
for z = 1, Size do
local Height = (math.noise(x / Smoothness, z / Smoothness) + 5) * Frequency
local p = Instance.new("Part")
p.Anchored = true
p.Parent = game.Workspace.Perlin
p.Size = Vector3.new(TileSize,Height,TileSize)
p.Position = Vector3.new(z * TileSize, Height, x * TileSize)
if Height <= Altitude then
p.Color = Colours[1]
print(Height .. " is lower than " .. Altitude)
else
p.Color = Colours[2]
print(Height .. " is higher than" .. Altitude)
end
end
end
end)