Help with player animations that can be seen on other clients

I am having an issue, where, if I replace an animation on a client (via the default animation script, where the script detects that the child has been changed) however, the client that made the change is the only one seeing this animation. Other clients are still seeing the default animation for that player. How can I ‘update’ the other clients to play the correct animation?

At first I thought, perhaps set the new animation from the server, but that is basically just telling the client to do it anyway?

Before I spend the next week trying different things and testing and pulling hair, is there anyone with any knowledge of this happening, and or any solution?

I am not a fan of reinventing the wheel. So any help on this is much appreciated, thanks.

2 Likes

Couldn’t you just create another animation object and play it instead of the original one?

1 Like

That IS what I’m doing. I create a new animation object, and replace the original one with the new one.
So then I see the new one playing, but every other client sees the old one still playing.

1 Like

I had assumed that an animation played on the humanoid of a player, would replicate to all other clients, but apparently this isn’t happening. So I thought maybe I need to somehow let all the other clients know the animation is switched manually. But I have no idea of how I would do that, or if that is even necessary or possible.

I meant, create both of the animations at the same time. Play one of them, then stop it and play the other one.

Ok, new information.
I tried to create the animation as a new object, and I was still getting the same effect.
So I went back to my original code, and discovered, that… on my local client I read the humanoids GetPlayingAnimations function, and it returns just the ‘one’ animation (this is a correct result, thus the animation looks correct on its own client)
When reading the same characters humanoi GetPlayingAnimation from the other client, it returns that I am playing ‘three’ animations.
They are… 1) my idle animation (correct) 2) R15WalkSync (whatever that is) and 3) R15Run
So… does anyone have any idea why I might be getting this result?

Thanks.

I have guessed, that since I am replacing an animation, maybe somehow that keeps it from stopping a previous animation, so that ‘false’ animation is still playing on other clients, even though it has stopped on mine, to allow for the new one.
I now force a stop to all animations when replacing animations (this seems to work in fixing the issue where I had multiple animations playing on the remote clients)
However, there is still the problem of when I swim or walk with my new animations, i see it instantly on my client, while remote clients will play a ‘platform standing’ type of no animation for a while, until the new animation i guess is copied to other clients. Is this normal, or is there a way to preload the new animation to keep this from happening?