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 can
t tell where the problem is