I was looking around for this for a while. So basically, I want to know how to make unions in scripts, and I also want to use this in a possibly future game.
I attempted it with the devforum code but for some reason that actually gives an error. Anyone know how to use them in scripts correctly?
This was the devforum code:
local part = workspace.Part1
local otherParts = {workspace.Part2, workspace.Part3}
-- Perform union operation
local newUnion = part:UnionAsync(otherParts)
-- Destroy source parts
part:Destroy()
for _, otherPart in pairs(otherParts)
otherPart:Destroy()
end
-- Insert new union into workspace
newUnion.Parent = workspace
(I did add the parts by the way.)

2 comments
What did the error say? It could be something as simple as not having a part inside of workspace named "Part1."
I did add the parts 1 to 3 like the code had it. The error was: expected 'do' when parsing for loop, got 'otherPart'