In order to have KeyframeReached events working correctly, you must not let the AnimationTrack you are playing go out of scope in Lua. If it goes out of scope, the AnimationTrack will be garbage collected and when that happens, it will no longer fire the KeyframeReached signal, since that too will be cleaned up.
What’s causing the AnimationTracks to be garbage collected? They’re all referenced at the very top of the script outside of any functions or anything. What’s garbage collecting them now that wasn’t garbage collecting them a few months ago?
Without a sample of code, it’s hard to say. Previously, I was able to identify out of scope issues with another animation script I was debugging, so I wanted to present that as a possible solution to this problem. If you are still having issues and if you have a simple reproduce case, please post a link to the simplified place and I’d be happy to take a look.
Alright, here’s the sample place, stripped down to just the custom character.
The issue is that none of the KeyframeReached functions in the Movement script (inside Guy2, the character template) work past the first use of each animation track. You can click to slash the sword multiple times to see it doesn’t do the three-strike combo properly the second time around. Rolling (pressing E while running) also “slides” after the first roll because it doesn’t fire AnimationReached for the “rollend” keyframe (yet, somehow still detects the end keyframe??)
Ok, I was able to track down the issue with your simplified place and have a fix for it. It will likely be in the release next week (unless something else comes up in testing).
Thank you!