I'm rewriting the classic btools (copy, move, etc) so that they work exactly as intended for modern Roblox, and for the copy tool, I've finished the system where the copied brick will go to the first available spot above the original brick. This worked great, and then I wanted it to be able to connect it to the original block if the surfaces matched; I'm using stud-and-inlet bricks which is handy because they automatically attach together. I was wondering how I could do it when a Google search brought me to the developer page for the MakeJoints() Function. This is useful to me, because it does exactly what I wanted, but I'm now cautious because of the warning at the top of the page:
Deprecated
SurfaceType based joining is deprecated, do not use MakeJoints for new projects. WeldConstraints and HingeConstraints should be used instead
This concerns me, because my game and the btools really depend on using studs and inlets. I really don't want to go out of my way to get it to work using WeldConstraints, because this works well enough and I'm going to be using the old look regardless. So, is this something I should avoid? I feel like labelling this as deprecated isn't right, considering how many games still use the SurfaceType based joining.
Welding each part with WeldConstraints is much better at the least, but I wouldn't say they are the most efficient. You can weld every part inside a model with GetDescendants() and weld it to the part you would like.
Here's a code example.
for i,v in pairs(model:GetDescendants()) do if v:IsA('BasePart') and v.Name ~= 'MainPart' then local w = Instance.new('WeldConstraint') w.Parent = v w.Part0 = v w.Part1 = model.MainPart end end
MakeJoints is much better because of how fast it is. Writing all that code just to join a model is unnecessary and the engineers can make a new function for that.