Stage Generation Somehow making weird positions

So basically, a module handles all the stage generations, but when it comes to spawning the normal stages difficulty stages it has kinda gone horribly wrong


The code is this:

if #lastMapGeneratedFolder:GetChildren() == 0 then
		clonedMap:SetPrimaryPartCFrame(,, 0, 0))
		local lastMapGenerated = clonedMap:Clone()
		lastMapGenerated.Parent = lastMapGeneratedFolder
		for _, lastMapGenerated in pairs(lastMapGeneratedFolder:GetChildren()) do
			clonedMap:SetPrimaryPartCFrame(,, 180, 0))
			--CFrame.lookAt(lastMapGenerated.PrimaryPart.Position, lastMapGenerated.Finish.Position)
			local lastmapGenerated = clonedMap:Clone()
			lastmapGenerated.Parent = lastMapGeneratedFolder


Basically, it checks when there is no map in the “lastMapGenerated” folder, when there is no map it sets the stage’s position to the Starting Position of the stage, else if there is a stage in the folder, it checks it’s “finish” part position and makes the current stage that is being cloned go to after that position but it somehow goes to the second “2nd Stage” I thought it was a problem of the rotation but it doesn’t seem to be the problem tho.

the set primarypart cframe part will make it look up