How to make a tree generator

How do I make it go like this

Instead of this

(And on a 3d level)
Because this is what I have

If I make the random orientations even larger it will go crazy and unrealistic
Here’s my script

local e = workspace.Part
local a ="Part",workspace),math.random(30,50)/10,e.Size.Z),e.Size.Y/2,0),a.Size.Y/2,0)
local b ="Part",workspace)
b.Anchored = true*.9,a.Size.Y*math.random(30,45)/10,a.Size.Z*.9)*(a.Size.Y/2))*CFrame.Angles(math.rad(math.random(-10,10)),math.rad(math.random(-10,10)),math.rad(math.random(-10,10)))*,b.Size.Y/2,0)
for i=1,2 do
	local c ="Part",workspace)
	c.Anchored = true*.8,math.random(40,65)/10,a.Size.Z*.8)*(b.Size.Y/2))*CFrame.Angles(math.rad(math.random(-25,25)),math.rad(math.random(-25,25)),math.rad(math.random(-25,25)))*,c.Size.Y/2,0)
	for i=1,math.random(2,3) do
		local d ="Part",workspace)
		d.Anchored = true*.4,math.random(60,85)/10,a.Size.Z*.4)*(c.Size.Y/2))*CFrame.Angles(math.rad(math.random(-65,65)),math.rad(math.random(-65,65)),math.rad(math.random(-65,65)))*,d.Size.Y/2,0)
		for i=1,math.random(2,3) do
			local e ="Part",workspace)
			e.Anchored = true,math.random(60,85)/10,d.Size.Z/1.5)*(d.Size.Y/2))*CFrame.Angles(math.rad(math.random(-65,65)),math.rad(math.random(-65,65)),math.rad(math.random(-65,65)))*,e.Size.Y/2,0)

- br, iSyriux

  1. Add the Default Tree in ReplicatedStorage and make sure the parts are ungrouped
  2. Add a script that randoms an Orientation for each Children inside of the Tree that is the Parent
  3. Make the script clone it on a random position inside the area of the map or whatever

If this helped you mark this as a Solution


Group the Leafs with the part connected to it and make the same steps as the last post