The main problem is that the hierarchy of the skeleton is not the same for your character than for the character in the other PG. It seems you should use index #38 to properly attach the sword to the hand.
Also:
- the order of the anims in
PICKED_ANIMS
should be given in the order they appear in thescene.animationGroups
array - I changed how to compute the value passed to
goToFrame
(line 161), I’m not sure how the previous code could properly loop…