How do I choose main part of weld

How do I make the red part go to the grey one

WITHOUT Anchoring either parts or changing their CFrame

I want the weld to automatically use the grey part as the main one

4 Likes

use a weld constraint and set Part0 to the grey part, and Part1 to the red part

weld constraint won’t move red to grey itll just move them together when one of them moves

so set part0 on the weld to the grey one and part1 to the red

I did that but in the video but it doesnt make a difference

so what exactly are you trying to do?

you can’t move a part without changing its cframe

You should try setting the Weld.C0 and Weld.C1. Those are the locations of the welds in Part0 and Part1.

1 Like

watch the video the grey is moving to red without me changing the cframe

1 Like

yes but its cframe is still changed when it moves

noo im trying to understand why the grey is always moving to red, what makes the red one priority

1 Like

yea but im not doing it manually

Just tested it, it makes the parent of the weld the “BasePart”.

1 Like

It’s based on whatever the parent of the Weld instance is – if you don’t want them to move at all, I would suggest using a WeldConstraint instead. :slight_smile:

1 Like

its not

1 Like

Hmm… Strange, when I tested it in studio, I got opposite result. Is one of the parts anchored and the other not? I don’t use the old Weld instances anymore, only WeldConstraints.

Try using a WeldConstraint, not a Weld. The normal Weld is deprecated and WeldConstraint should be used instead. With a normal Weld you have to specify explicitly the CFrame offset points of each part, which is not very intuitive. Instead, Roblox gave us the WeldConstraint, which will automatically set the CFrame offset points and will leave the parts at their current CFrame in the world.

1 Like

You’re gonna need to make the parts touching if you want to weld them. Otherwise if you want to weld regardless of position, use a WeldConstraint.

1 Like

Parts don’t have to be touching to weld them with a script.