Clone model and place it on different positions with primary part

I was trying to generate player’s private room by generating “room model” on different positions.
i tried it with using model:SetPrimaryPartCFrame(CFrame), but my code didnt worked, so i just removed it.

local vault = game.ReplicatedStorage.Things

game.Players.PlayerAdded:Connect(function(player)
	local folder = Instance.new("Folder")
	folder.Name = player.UserId .."Folder"
	folder.Parent = workspace.PrivateBuilding
	
	local vault1 = vault:Clone()
	vault1.Parent = folder
	for _, Child in pairs(vault1:GetChildren()) do
		Child.Parent = vault1.Parent --Move the children up one parent
	end
	vault1:Destroy()
end)

game.Players.PlayerRemoving:Connect(function(player)
	local folder = workspace.PrivateBuilding:FindFirstChild(player.UserId .. "Folder")

	if folder then
		folder:Destroy()
	end
end)

image
can someone help me do it?

There is no mention of SetPrimaryPartCFrame in your code at all. We need the code where it uses that function to understand what the problem is.

By the way, you shouldn’t be using SetPrimaryPartCFrame, use PivotTo. PivotTo is much better.

clone:SetPrimaryPartCFrame(CFrame.new(pX, pY, pZ))
clone.Parent = workspace