Right Now Using Union Script From Roblox But Turns Our It Also Dosent Work
local part = workspace.Part1
local otherParts = {workspace.Part2, workspace.Part3, workspace.Part4}
-- Perform union operation
local newUnion = part:UnionAsync(otherParts)
Right Now Using Union Script From Roblox But Turns Our It Also Dosent Work
local part = workspace.Part1
local otherParts = {workspace.Part2, workspace.Part3, workspace.Part4}
-- Perform union operation
local newUnion = part:UnionAsync(otherParts)
Roblox is dublicating parts when using BasePart:UnionAsync(). It is similiar to Object:Clone() so first of all you need to assign a Parent for newUnion. You can remove parts or hide them if you want to use them later.
Example
local part = workspace.Part1
local otherParts = {workspace.Part2, workspace.Part3, workspace.Part4}
-- Perform union operation
local newUnion = part:UnionAsync(otherParts)
newUnion.Parent = workspace
-- Removing original parts
workspace.Part1:Destroy()
workspace.Part2:Destroy()
workspace.Part3:Destroy()
workspace.Part4:Destroy()
you could parent all the parts to nil, so its still in the memory but people cant see it, this is still a good solution
oh wow i literally forgot to parent the union Lol I Thought It was gonna do smthing else
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
i know this is answered but roblox said this which is better than all my explanations: "The resulting union instance will have a null parent and will be named “Union”."