Create an event, set it under ReplicatedStorage. Perhaps edit the function’s code to also fire the Event and then have another function on the server play the same animation. Make your playAnimation function a server sided module. In fact, don’t call the function on the client at all and instead it will replicate all the time from the server, it is a simple process and so would not have delay
Are you playing the animation from the Humanoid? You should be playing it from the Animator, which is parented under the Humanoid. This will allow the AnimationTrack and everything done to it to replicate to the server.