Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How would i make a union using a script?

Asked by 9 years ago

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

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 Legojoker 345 — 9y
0
Make it an answer^ Goulstem 8144 — 9y

1 answer

Log in to vote
1
Answered by
1waffle1 2908 Trusted Badge of Merit Moderation Voter Community Moderator
9 years ago

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.

Ad

Answer this question