How to generate random map with parts?

I need a random map generation script for a game. It needs to have ores, trees, cactus, different biomes. I tried two ways one of them I kind of worked I managed to make a random block placer thing but that’s not really what I need I also tried using Berazaas Mining Kit to make the ores but I couldn’t do that is there an article for this? or a code? maybe a plugin?


There are so many resources on terrain generation you can read. Use your search engine.


You might want to use scattered transparent parts which you can choose one randomly. Then you can replace a clone of model you want to put with thechoosen part
This want is used a lot for coin generation

local Part ="Part") --For cloning
Part.Anchored = true
Part.FormFactor = "Custom"
Part.Size =,4,4)
Part.TopSurface = "Smooth"    

local seed = math.random(1, 10e6)
local frequency = 3
local power = 10
local resolution = 100

for x = 1, resolution do
	for z = 1, resolution do
        local y1 = math.noise(

		local y2 = math.noise(
		local y3 = math.noise(
		local y = (y1*y2*power*power)+y3
        local Part = Part:Clone()
        Part.Parent = game.Workspace
        Part.CFrame =,y,z)
		if math.abs(y2) < .1 then                         --You can remove this if  statement
		    Part.BrickColor = BrickColor.Green()
		elseif math.abs(y2) > .25 then
		    Part.BrickColor = BrickColor.Red()
			Part.BrickColor = BrickColor.Blue()

I found this code on Reddit you can customize it.

here is the link: []

But if you guys have better ones pls send them to me or if you have tutorials for random map generation

The best way is using perlin noise for the surface generation


Perlin noise is indeed pretty cool. It can be used to create a lot of different stuff. For reference, here’s an example of something I made using only perlin noise:

Then you can use other methods to add things on the surface. The good thing about perlin noise is that it’s very easily customizable and you can get really cool effects using it.

There a couple good scripting helpers articles on perlin noise.
(Terrain generation, what and how? - Scripting Helpers)