Animation Events aren’t reliable

Hello, some of the attacks in my game do a self-stun during animations, some grant you invincibility, some change your model depending on certain keyframes etc.

The animation events work perfectly most of the time but there are a few issues that I’m not sure how to deal with.

1- Rarely, the animations don’t load, I added a preload script for all the important animations yet they sometimes still don’t load. Some people can’t respawn since characters reset after the death animation ends (with animation.stopped). Some can’t get out of their self-stun because it gets removed after the attack animation ends etc. What should I do about this?

(Right now, there’s a local script on replicated first with all important animations copied into a folder and it preloads it with content provider)

2- Lagging mid-animation causes issues too. A person reported that lagging mid-animation caused him to not get out of his self-stun. The self stun wears off with animation.stopped aswell.

Overall, this whole experience with animation events and things connected/fired with animations is very unreliable and it’s an essential thing for my game. What should I do? Any alternatives? Any ideas on what I’m doing wrong?

Hey man, if you want people to help you, you should provide some code.

1 Like