How Do I Stop The Blocks Spawning In Each Other?

I am trying to spawn each block on top of each other, it worked for the first block but then started spawning in each other.

I have tried adding waits, and adding more things to make it more specific, but with no result.

^ As you can see the grey blocks are spawning in each other.


local height = 5
local waitTime = 2
local towerPosition =,0,0)

local TowerPeices = game.ServerStorage.TowerCreator.TowerPeices:GetChildren()
local TowerBases = game.ServerStorage.TowerCreator.TowerBases:GetChildren()
local baseCreated = false
local previousPeice
for i = height, 0, -1 do
	if baseCreated == false then
		local base = TowerBases[math.random(1,#TowerBases)]:Clone()
		base.PrimaryPart.CFrame =
		base.Parent = workspace
		baseCreated = true
		previousPeice = base
	elseif baseCreated == true then
		local towerPiece = TowerPeices[math.random(1,#TowerPeices)]:Clone()
		towerPiece.PrimaryPart.CFrame =*(previousPeice.PrimaryPart.Size*,1,1)))
		towerPiece.Parent = workspace
		previousPeice = towerPiece

Ps: The Blue piece is the tower base

Could you try making the Grey part a Model?

all the ones created by the script are the models, those regular parts in the workspace are random parts

The post is now resolved, its not letting me delete it so ill mark it as resolved.