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.
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?
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)