Hello I am currently trying to get my enemies to play an animation when they are attacking. The enemies do play the animation on the server but not on the clients and the same code is being run on both. Both the clients and the server take damage and the code that does damage is after the punching bool is set to true which triggers the animation. They are running a behavior tree in which they will hit the player when within a certain distance. I have break pointed the code and i can tell that it is running the task at the correct time and the enemies are damaging the player, however the animation does not play. I have tried using multicast events and run on server events as well as replicating the bool that allows the transition of the animation states.
I prefer not to use the Anim BP to replicate variables as it is instanced it doesnt seem to sync in the same way as a Character BP does say. What I typically do is have the replication in the character BP end so it gets passed to all Instances of the Anim BP when its replicated. Hope this helps
Thanks for your help I did what you suggested and moved the animation request to the enemies blueprint and it works great now.
Hey all, I’ve been having the same issue but reveresd for some reason. The Animation of the AI shows correct on Client but not on Server. The NPC is running a AnimBP which gets the controlled pawn (that’s valid on server) and gets the velocity which translates into the walking animation. But the Server does not play the walking animation while the pawn moves around normally!