Union async doesn't union at all

I’ve just learned how to union parts, and I just wanted to try it out myself. I used 2 parts, one named “Part” and the other named “Part2”, both parented to the workspace. I am using a server script that is also parented to the workspace

When it tested it myself, the 2 parts don’t union together. The parts are still separate, like I didn’t write the code at all. Am I doing something wrong? I’ve been testing for the past half an hour, and I’m still testing.

I’ve searched the internet, and there were only one person that had the same issue as I, and there were no solutions there.

Here’s my code,

local Thing = {workspace.Part2}
local Thing2 = workspace.Part
local Yes =	Thing2:UnionAsync(Thing)
2 Likes

Did you try copying the code in BasePart | Roblox Creator Documentation and seeing if that works? If not then you are deleting the parts somehow.

Also try it with more then 1 part.

For some reason the copy and pasted code won’t work either.

Im having this issue as well

local ReverbZones = game.Workspace:WaitForChild("Reverb Zones")

for _, Sound in pairs(script:GetDescendants()) do
if Sound:IsA("ReverbSoundEffect") then

local ZoneParts = {}

for i, Zone in pairs(ReverbZones:GetChildren()) do
if Zone.Name == Sound.Name then
Zone.Name = Zone.Name..tostring(i)
table.insert(ZoneParts, Zone)
end
end

local ZonePart = ZoneParts[#ZoneParts]

for i = 1, #ZoneParts-1, 1 do
ZoneParts[i] = ZoneParts[i + 1]
end

--print(table.concat(ZoneParts))
if ZonePart then
local Union = ZonePart:UnionAsync(ZoneParts)
Union.Anchored = true
Union.CanCollide = false
Union.CanQuery = false
Union.Transparency = 1
Union.Name = Sound.Name
end
end
end

I found out the issue you need to set the unions parent, :unionasync() almost acts like :clone() so try this.

Server Script:

local Part = game.Workspace.Part1
local OtherParts = {game.Workspace.Part2}
local NewUnion = Part:UnionAsync(OtherParts)
NewUnion.Parent = game.Workspace
6 Likes