Why are my animations being delayed?

Hi, I’ve recently tested my game and have found a bug that happens whenever I play an animation. The bug is that sometimes when i play an animation it will delay a 1-2 seconds after. This only happens for the first few animations all of them after that work fine. I’m not really sure what to do cause this isn’t something anyone would just know. Here some videos for a better picture.


No Delay

You can kinda see the animations happening all at once with the delay one but with No delay it’s more smooth. This happens to just about all animations so I can’t give a specific script. But if you really need one I’ll give it to you. Any help would be appreciated.

Regards, powerdud

You can give a code sample if not a specific script so it’s at least visible how you’re using animations in your game. Without knowing what you’re doing even in part for the scripts that are presenting this issue, becomes difficult to help.

The only thing I can offer here is: by any chance, are you playing those animations from the server? This kind of behaviour tends to happen when you do so. Animations should be played from the client.

I am actually playing from the server. I’ll try your suggestion and see if it works.

If you play animations from the client, is there a way to tell when the anim reaches an event on the server? I want to play animations from the client in my game but I don’t know how to detect if an event reaches on the server.

I’m no expert but I find there being no reason to detect that the event has reached the server cause it’s almost instant when using an animation. Objects I’m not so sure about.

If the server is able to fetch a reference to the AnimationTrack that the client plays, then you do what you normally do: use GetMarkerReachedSignal (or for named keyframes, KeyframeReached). If this does not help you, please make a new thread regarding that topic rather than using this thread for it.