Horrible performance when using welds instead of :MakeJoints() within models?

Hello Robloxians,

I want to start off by pointing out that :MakeJoints() has become deprecated, so I am looking for an alternative. I use :MakeJoints() to create joints between 2000+ part destructible models with little to no performance impact. However, when I use a script like qPerfectionWeld, and destroy a single part, I run into lag spikes where individual frames take 300+ ms to render with no physics updates. In my specific use case, I can not see a viable alternative to :MakeJoints(), but I really don’t like using deprecated stuff. Is it fine to use it for the time being, or is there a non-deprecated alternative?

Simple joint making loop example:

for _, jModel in pairs (newMap:GetChildren()) do 
	if jModel:FindFirstChild("JointObj") then -- "JointObj" is simply an empty value that tells me which models within the main model need joints made.
		jModel:MakeJoints() -- Very little performance impact, but is deprecated.

SurfaceType-based joining in general is deprecated.

What about welding them yourself using WeldConstraints?

I could certainly try weld constraints.

The models which are being welded together are all unanchored so they can be manipulated and destroyed. Is there a way to generate welds automatically with touching parts within studio?

I don’t think there is. However I do have a plugin that welds parts using weld constraints which I can share if you wish

That sounds great, I would love to know the plugin.

I just select whatever models in workspace that need welding, then run this code in the command bar, and it welds whatever touching parts together

local function weldModel(model)
	for _, v in pairs(model:GetChildren()) do
		if v:IsA("BasePart") then
			workspace:JoinToOutsiders({v}, Enum.JointCreationMode.All)
for _, v in pairs(game.Selection:Get()) do

This actually works perfectly. Thank you for alleviating my headache.

1 Like