Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How would i make a union using a script?

I don't really know how to make unions with scripts, are there any things that let you group or union two blocks together?

2 comments

1

Models act as a parent to a group of parts, but if you want parts to be consistently attached to each other, I would suggest welds. Unions themselves cannot be created outside of studio. http://wiki.roblox.com/index.php?title=Weld

0

Make it an answer^

1 answer

✓ Accepted answer

Unions and negations can be made through a plugin by using plugin:Union(table of BaseParts) and plugin:Negate(table of BaseParts). UnionOperations can be separated using plugin:Separate(table of PartOperations)

These cannot be used outside of a plugin or outside of studio. Unions cannot be created ingame. If you simply want to join things that are unanchored, you can weld them together:

function weld(a,b)
	local w=Instance.new("Weld",a)
	w.Part0,w.Part1=a,b
	w.C0,w.C1=a.CFrame:inverse(),b.CFrame:inverse()
	return w
end

and they will be stuck together unless something like an explosion breaks them apart.

This discussion is preserved as it was. New answers, comments, and votes are closed.