How do I make welded parts stay with an anchored part when it is moved?

I have an anchored part with a part welded to it. I want the welded part to move with the anchored part when I move it. Is that possible? If so how?

Do you move while you are playing or in the studio, makes sense.

That made no sense. I’m moving part with script btw.

Unanchor the part, it would not even move if you anchor something.

I have an anchored part that I am moving and a part that is welded to it that I want to move with it.

Maybe you could move both in the script or union them and do something like this to move it.

local Part = script.Parent

while true do
	Part.Position = Part.Position + Vector3.new(1,0,0)
	wait(0.1)
end

My concern with moving them both is that it would be more laggy than if I could get the weld to work.

I am not sure how to get a weld to work, if you union them it would. I don’t think you should be to concerned with lag when moving 2 parts.

That was just abstraction. The real thing I’m using is around 50 and it will run once every physics tick.

Ok, try to union them or maybe move a model?

Is the welded part anchored too?

Ill be tweening the parts attached to the anchored one so unioning is not a option. @HDefine No its not anchored

Weird, tweening an anchored part with welded parts attached to it usually works fine for me.

If you put all of your parts into a model, you can tween them and it should work.

I’m moving the part in very small increments. Tweening every physics tick does not seem like a good idea.

Using the link that I have provided, you should be able to tween the model with no performance issues. It will just move the model to a set position instead of moving every single part separately.

Don’t move it by its position value but rather move it by the CFrame. If you move by CFrame then anything connected to it will also move.

3 Likes

You might have to consider using BodyMovers to achieve this.

BodyMovers allows you to move unanchored parts that can also move other parts that are welded.

Unfortunately, trying to move an anchored part with a welded object is physically impossible outside of Studio edit mode.

For my purpose, the part I’m moving will have to be anchored.

You can move anchored parts, Anchored just means that no physics is calculated for that part.

1 Like