Setting replicated child actor class on one pawn affect all pawns

Hello everyone, I have a switch weapon system that I’m trying to replicate. The player holds a child actor component, and when they switch weapons, it’ll only set the child actor class. However, when I attempt to set the child actor class to a new one, all players are affected.

Screenshot 2022-06-21 122339
Screenshot 2022-06-21 122353

Seems to me that it’s just the animation that plays on all clients instead of playing only on the character who switched weapon. The first player even revert backs to knife pose after playing rifle animation.

How about showing the part that plays equip animation instead? :stuck_out_tongue:


Where do you call ClientDraw from ?

1 Like

Another user pointed out the ClientDraw node and I deleted it completely, still facing the issue. Another thing I replied to the other user with:

“I’m facing the same issue with all weapons, and I’m pretty sure the animation isn’t being called somewhere else. For example, in the editor I chose the knife to be the initial weapon the player should spawn with, and so there isn’t any script in the pawn that could affect the weapon any way. In addition, the script for the knife draw is the same one as the m4a4 and yet the same issue happens with it. Once the players spawn one by one, the knife draw animation is played for each newly connected client.”

Also I just noticed something, the AnimMontage for the arms are playing and not the whole sequence, seems to be a problem with the arms and not the child actor itself?

I solved it, the problem was not the child actor itself, rather I was playing the animation montage of the arms for everyone instead of just the owner. I replaced the getPlayerCharacter(0) with getOwner()