Cant union 2 parts with a script

local Patty = script.Parent.Top:UnionAsync(script.Parent.Bottom)

error: Unable to cast value to Objects - Server - Drag:5

UnionAsync takes a table of objects as parameters.

Do this: local Patty = script.Parent.Top:UnionAsync({script.Parent.Bottom})

error went away but i dont see the parts as being a union

Patty is probably the union so just do:

local Patty = script.Parent.Top:UnionAsync({script.Parent.Bottom}) --create the union
Patty.Parent = script.Parent --parent the union to the script parent(or workspace if you like)
script.Parent.Top:Destroy() --destroy the top part
script.Parent.Bottom:Destroy() --destroy the bottom part
1 Like

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