Union making system only works for single parts

I’ve made a system for turning a group into a union but it only works for it only works for parts on their own and when I try to apply it to models I get an error on line 18 saying

CSG API requires at least one object to be linked to a DataMode

				local HollowTable = {}
				local Object = script.Parent.Object.Value
				local Object2 = Object:Clone()
				local Parts = Object2:GetDescendants()
				Object2.Parent = workspace
				for i = 1, #Parts do--Remove non parts
					if Parts[i]:IsA("Union") or Parts[i]:IsA("Part") then
						Parts[i].Anchored = true
					else
						Parts[i]:Destroy()
					end
				end
				local Parts = Object2:GetDescendants()
				for i = 1, #Parts do--Add to table
					table.insert(HollowTable,Parts[i])
					MainPart = Parts[i]
				end
				local HollowBuild = MainPart:UnionAsync(HollowTable)
				HollowBuild.Parent = workspace

I cant really find much on UnionAsycnc so i cant tell where the problem is

I found the problem if was to do with the way I was storing the parts to be cloned and the fact that I used IsA(“Union”) rather than IsA(“UnionOperation”)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.