Welded parts of a model not moving with the PrimaryPart

Hello everyone,

Title explains it all, I have a model where the primary part is owned by the client (so the entire model shd be as well), but when I move the primary part, the others welded parts to it doesn’t move. The parts are not destroyed and the weld still exist, it just doesn’t move.

Any ideas on where the problem would come from ?

https://gyazo.com/9b2bd97d252a283b31456933e8ded002

https://gyazo.com/0066e14d7e3e9742017b30385f7fe361

1 Like

Have you taken care of anchoring? Most likely that is the issue. Certain parts have to be unanchored, and since you are using BodyVelocity, it seems like you need to unanchor every involved part.

EDIT @Lord_Monever

Glad you found the solution. Would you mind telling where the catch was? Unless you need to use offset properties (C0 and C1), which you can find in classical welds, I suggest you use WeldConstraints, which are their successor.
I mentioned BodyVelocity, because it only works with the unanchored parts (to which physics can apply). Otherwise, you can have one anchored primary part and multiple unanchored parts welded to it. That will keep the distance between them and not pull them closely together. At the same time, exploiters can’t customly move the parts, because they are bound to one anchored part, to which, as previously said, physics simulation doesn’t apply.

Another alternative to moving models without welds is using :SetPrimaryPartCFrame(), which is useful, but not ideal for rapid moving and spinning, because for some reason parts slowly drift appart.

I hope you find this informational.

Have a nice day!

1 Like

All parts are unanchored, except the primaryPart (well don’t look at the bodyPosition, because it gets destroyed later). The other parts act as if the primarypart didn’t move

All right I think I got the solution, ty

@EssenceExplorer Okay so it’s weird. At first my problem was solved when I didn’t anchor the part (on the client) and didn’t destroy the bodyposition of the primarypart (on the client).

It acted as I wanted, but I don’t want the bodyposition, which is actually causing me problem.

I destroyed the bodyposition (on the client) but didn’t anchor the primarypart (reminder each part in the model isn’t anchored) and I’m setting the position of the primaryPart in an heartbeat event to be around the character. But the welded parts act as if the bodyposition wasn’t destroyed and stay at the same place (they don’t move at all). So the primary part moves, the welded parts doesn’t and the welds are still here … Confusing ? yes I’m kinda lost hahaha

I’m using the bodyposition so the model doesn’t fall in the void, since it doesn’t collide with the world, and the model must be unanchored to set the networkowner.

I think that maybe removing the bodyposition could fix the problem from the server. But I don’t want it to be collidable with the rest of the world.

Are you using SetPrimaryPartCFrame?

No and I don’t want to use SetPrimaryPartCFrame because as said before

UPDATE : On the server the parts follow the primary part, but not on the client …

This is indeed a little confusing. The general rule is that as long as filtering is enabled, with certain exceptions, nothing replicates from client to server or from client to other involved clients. Even if you remove BodyPosition client-side, it stays in the same place on the server and for everyone else. Do everything on the server and use remote events whenever necessary. The only property clients are supposed to change in this case is coordinate frame.

I’m setting the networkownership of the part of the client, to reduce the stress on the server. I actually don’t understand why the parts looks okay on the server and follow the primaryPart, but seems like they are free falling on the client, even tho I didn’t touch them, and just moved the position of the primarypart.

View from server : https://gyazo.com/97815f45c97857a338697e68b408763b

Parts should not be anchored. Also, part0 should be the primary part!

PS: You must use cframes, not position!

Thank you for trying, but it’s not the problem, if you saw the last link I sent, you can see that the parts are unanchored. The part0 of the weld is the primary part. And using position is fine, the welded parts shd still move with the primarypart.

Using Position ignores welds, use CFrame instead.
Weld (roblox.com)
WeldConstraint (roblox.com)

“If a welded part’s Position is updated, the part will move but none of the connected parts will move with it. The weld will recalculate the offset from the other part based on the part’s new position.”

9 Likes

I’m using weld and not weldconstraint, also :

" Welds do not have any directionality. Part0 or Part1 , doesn’t matter. You can imagine rigid joints forming a tree branching down from the root part. All the parts down the tree from root will move, and their welded “children” in this tree will move with them."

And if what you said was correct, then it wouldn’t look fine on the server.

PS : no use CFrame lol

Time to apologize lol.

I still tried the CFrame with no convictions, and it worked hahaha. I really thought that moving the position of just the primarypart was fine, guess I was wrong.

Thx for helping

2 Likes