Walking Physics get messed up when I create a weld during animation!

When I create a weld on an animation event, once the animation is over I have this odd shifting behavior when I walk forward or back as seen here. It’s as if the Model I welded to my character’s hand has become a rotation axis for my character.

What I have tried:

  • I’ve tried handle the weld on both the client and server which had no effect on the outcome.
  • I’ve ensured all the parts within the Model have are Massless, have CanCollide off, and are not Anchored.

The code is pretty straightforward:

Anim:GetMarkerReachedSignal("GrabLock"):Connect(function()
	Obj.Anchored = false
	SharedMemory:Weld(Player.Character.LeftHand,Obj) 
end)

I don’t really know what could be causing this, any help is appreciated!

2 Likes

I believe this happens when you add weight to one side of the character. If you go into your explorer, delete the newly-welded object does it fix this problem?

Yes, the walking physics return to normal, but why would this weight effect occur even when the welded object is Massless?

1 Like

I’ve found a very peculiar fix. After the animation is completed, if I delete any part of the welded Model, the Physics return back to normal. Hence, a solution could be implementing a ‘useless’ part in the welded Model that you can delete after the animation finishes. A more simpler solution that I later found worked was to very briefly Anchor a part of the player character. I don’t know why this is: hopefully at some point someone will be able to clarify this behavior.

Working version:

Anim:GetMarkerReachedSignal("GrabLock"):Connect(function()
	Obj.Anchored = false
	SharedMemory:Weld(Player.Character.LeftHand,Obj)

             --Solution--
	wait(Anim.Length-Anim.TimePosition) --Wait time left in animation
	Model.useless:Destroy()

end)

or

Anim:GetMarkerReachedSignal("GrabLock"):Connect(function()
	Obj.Anchored = false
	SharedMemory:Weld(Player.Character.LeftHand,Obj)

             --Solution--
	wait(Anim.Length-Anim.TimePosition) --Wait time left in animation
	Player.Character.LeftHand.Anchored = true
	wait()
	Player.Character.LeftHand.Anchored = false
end)
2 Likes

That’s a very interesting find. I’ll probably have to use that for one of my games if I don’t find any other solutions as well.