I want to make tress spawn randomly like perlin noise

## My Terrain Generation

mapxsize = 128

mapysize = 64

mapzsize = 128

seed = math.random(1,100000)

noisescale = 30

amp = 15

psize = 2

positiongrid = {};

for x=0,mapxsize do

for z=0,mapzsize do

for y=0,mapysize do

xnoise = math.noise(y/noisescale,z/noisescale,seed)*amp
ynoise = math.noise(x/noisescale,z/noisescale,seed) amp
znoise = math.noise(x/noisescale,y/noisescale,seed)amp
local density = xnoise + ynoise + znoise + y
local densityX = xnoise + ynoise + znoise + x
local densityZ = xnoise + ynoise + znoise + z
if density < 2 and -density < 10 and densityX < 64 and densityZ < 64 and -densityX < 35 and -densityZ < 35 then
local block = Instance.new(â€śPartâ€ť, workspace.terrainFolder)
block.Name = "Block â€śâ€¦xâ€¦â€ť, â€śâ€¦yâ€¦â€ť, "â€¦z
block.TopSurface = â€śSmoothâ€ť
block.BottomSurface = â€śSmoothâ€ť
block.Material = Enum.Material.SmoothPlastic
block.Anchored = true
block.Size = Vector3.new(psize, psize, psize)
block.CFrame = CFrame.new(xpsize,ypsize,z*psize)

```
block.BrickColor = BrickColor.new("Bright green")
end
end
end
wait()
```

end

I dont know how to add so that model/tree spawn randomly in the terrain

I have tried doing math.random but my knowledge is too small