How does Part:UnionAsync() work?

Quick question, I was trying to use :UnionAsync() to union a group of parts, and when its on a short scale it looks fine, but when I try a larger group, this happens

image

I dont know why this happens, because when I test without as many parts, this happens (I want it to be like this)

image
Theres not much code behind this, its very simple

local purchaseRemote = game.ReplicatedStorage.Remotes.PurchaseLand

purchaseRemote.OnServerEvent:Connect(function(player, allGrids)
	--local price = #allGrids*100
	--local cash = player.leaderstats.Money
	local parts = {}

	--if cash.Value >= price then 
	--cash.Value -= price
	local f = Instance.new("Folder", workspace)

	for i,v in ipairs(allGrids) do 
		local part = script.Building:Clone()

		part.Parent = f

		part.Position = v.ColorPart.Position + Vector3.new(0,10,0)
		table.insert(parts, part)
	end

	local first = parts[1]
	
	table.remove(parts, 1)
	
	local totalBuildings = first:UnionAsync(parts)
	totalBuildings.Parent = workspace
	f:Destroy()
	
	
	--end
end)

Anyone have a solution?

You are not providing a renderFidelity so it results to automatic. That is why it looks like that.

This should fix your issue.

first:UnionAsync(parts, nil, Enum.RenderFidelity.Precise)
2 Likes

Ah didnt know this existed, thank you :slight_smile:

2 Likes