I have made a script which creates a shopping trolley for every character. This trolley is attached to a Belt part that is connected to the Torso via Align constraints. I used constraints because i initially tried a Motor6d, which resulted in the trolleys being very jittery, which i tried to fix as i thought this was the result of the rope constraint merging the assemblies. However, the align constraints seem to have the same effect.
Notes:
The Rope constraint is attached only to the Belt part, and a child of the Trolley.
The Belt is only attached to the torso’s WaistCenterAttachment via Align constraints.
These constraints have ApplyAtCenterOfMass, ReactionForceEnabled, and RigidityEnabled set to true.
ReactionForceEnabled is required for the trolley to pull the player back towards itself, and suspend them if the trolley is above them.
The trolley and the character are two separate assemblies.
The trolley and the character are one single Mechanism when the Align constraints are enabled, but two when disabled.
My current understanding is that when a character’s movement is replicated, it translates the entire Mechanism of the character around the HumanoidRootPart. As the trolley is a member of the Mechanism, it rotates unexpectedly with the character although this behaviour is not intended.
I was not expecting this kind of behaviour from Align constraints, as when i checked many other devforum posts about this problem, they pointed to these as the solution.
This problem has been very difficult to try and solve, i would really like some guidance on this.
The mechanisms seem to combine when i activate ReactionForces, but i wish to keep this property enabled. I tried to make ReactionForces only enabled on the trolley’s owner client, and while this seperated the mechanisms on other clients, it also made the trolley freeze on other clients.
The carts are set to be owned by the player controlling them, but I’ve recently found the problem isn’t due to the network ownership, it’s because both assemblies (the cart and the character) are being turned into a single Mechanism by the Align constraints, which makes roblox interpolate them around the mechanism’s RootPart (the HumanoidRootPart) which is behaviour i do not want.
The solution i’m looking for is a way to keep the assemblies as two separate Mechanisms, while also having the align constraints keep the expected behaviour of being attached to the character.
As for what it looks like when I do it, it works as expected.
However, i would really like to keep ReactionForces enabled as I need the trolley to also pull the player back if it is stuck.
I’ve tried enabling ReactionForces only on client, but this seems to heavily break the replication as the trolley just appears to float midair on other clients and the server.
And of course, when I disable reaction force properties, causing the Mechanisms to split apart (which is what i desire) it is replicated properly.
However, this means the cart does not pull the player back towards it if the rope is at maximum length. I would like to keep this feature for gameplay sake, but i may have to scrap it if this issue doesn’t get resolved soon
I’ve tried making it so that every client has their own rope and align constraints enabled only on client and not on server, but this seems to essentially just cause the same problem as the replication goes through the same process of telling the whole Mechanism to move and pivot about the Character.
I may be wrong about this issue of replication, but it’s my best guess for now