Massless, non-collidable objects welded to player cause unusual motion

I’m coding an equipment system right now and am having some issues.

  1. What do you want to achieve?
    I want to fix a bug where players seemingly randomly move sideways when jumping with a cape welded to their backs. The cape and bag are attached through a simple script that welds (through WeldConstraints) invisible ‘connector’ pieces of the cape and bag to the player’s UpperTorso.

  2. What is the issue?
    When players jump with the cape and bag equipped, they sometimes shoot off to the side.
    Notably, players always veer off to the left. The cape is symmetrical while the bag is mainly on the right side of the player.
    This video shows the described behavior:
    robloxapp-20200403-2205028.wmv (2.4 MB)
    All of the parts of the cape and bag are basic Roblox parts connected together by WeldConstraints. In the case of the cape, there is a single HingeConstraint connecting the cloth part to the bar on the player’s shoulders.

  3. What solutions have you tried so far?
    I have tried making all parts of the cape and bag noncollidable, massless, and frictionless. I’ve decreased the friction and elasticity weight to 0 and reduced the density to 0.01.
    I am certain the cape and bag are causing the issue as removing them from the character completely eliminates the issue.

I would appreciate any assistance in resolving this. Another thread from a few years ago reports a similar issue but no resolution was reached.

Edit: The source of the issue appears to be a HingeConstraint.

3 Likes

Is the cape welded to the torso or is the torso welded to the cape? The torso should be Part0, with the cape as Part1.

1 Like

That’s correct, the torso is Part0 and the cape is Part1.

local capeWeld = Instance.new("WeldConstraint", script.Parent)
capeWeld.Part0 = myCharacter:WaitForChild("UpperTorso")
capeWeld.Part1 = myCape["PrimaryPart"]