How Can I Move a Welded Objected Separately?

Hello! This is my first-time asking questions on the forum so bear with me…

  1. What do you want to achieve?
    I have 3 partsPartA, PartB, and PartC.

PartB is welded to PartA, and PartC is welded to PartB. I want to move PartC and PartB separately from PartA (If that’s even possible).
ex. If I move PartA, PartB, and PartC move with it. However, If I move PartB only PartC moves with it.

  1. What is the issue?
    I’ve been able to move all the parts together, but when I attempted to move PartB it either moved alone without PartC or didn’t move at all.

  2. What solutions have you tried so far?
    I’m not the best scripting in general, so I have just been messing around and mishmashing different sources together. The few related topics I’ve stumbled over were difficult to understand and/or didn’t work the way I wanted.

I finally ended up coming to the forum with my own topic to see if I could get any answers. There is probably a pretty reasonable way to do this, but I can’t seem to find it. You don’t have to provide a script, just a push in the right direction would be great! Thanks so much, I hope this made sense! :sweat_smile:

Maybe you can set part0 or part1 to nil or something? Try to do something with part0 or part1. OR YOU COULD TRY DISABLIGN THE WELD, like weld.Enabled = false.

Have you tried setting the Welds C0 or C1 to a new position?

1 Like

Motor6D’s C0 and C1

As @ForestFireTree1 said, you can just change the values of the C0 or C1 weld between PartB and PartC.
They are the offset of the weld.
What kind of weld are you using, a scripted weld, or a WeldConstraint?

I thought he already knew or tried that, but I guess not.

Sorry for the late response! How exactly do I change that? Would I use CFrames? I’m using WeldConstraints.

could you be more specific about what exactly are you trying to achieve?

do you want to move parts B and C separately without moving part A?

Yes, I want to move partB and partC without partA, but I still want partA to move partB and partC if that makes sense.

but do you just want to move those parts only in your workspace or you want to move them during a specific moment in your game?

and, are you using those parts just for building purposes or you want to give them a specific behaviour?

I just want to move position of the parts when one is clicked

you can group those parts to be able to move each of them

Try the Assistant in the View tab in Studio.
You can select items or scripts in the Explorer window to narrow down what the assistant is looking at, and use a request like “make a script to move (item C’s name) welded to (item B’s name) by changing the C0 (or the C1, whichever you want) of the weld”.
Change the bracketed items to actual names of items selected in the workspace.

The Assistant is pretty good AI for someone learning to script. It’s not always 100% correct, but it’ll tell you what to put in the script to change a weld’s Position (or Orientation).