Last keyframe of animations not detected with KeyframeReached

Reproduction Steps
This bug seems to happen whenever using KeyframeReached to check if the animation reaches the last keyframe.

KeyframeReached will still trigger if the keyframe has a unique name and it is NOT the last frame of the animation.

This can be recreated on your own if you simply make any animation and give a unique name to the very last keyframe.
Then when having that animation play, use KeyframeReached to check that last keyframe was reached.

I will include a link to a simple place I made just to demo the issue though.
https://www.roblox.com/games/9017480591/Animation-Tests

In the demo place, I’ve created 2 identical waving animations.
“Wave Broken” has the very last keyframe named “End”. Pressing Q will play this animation on the player.
“Wave Fixed” has the second to last keyframe named “End”. Pressing E will play this animation.

My system: Windows 11

Expected Behavior
Normally, KeyframeReached would detect the last keyframe. Suddenly it stopped doing so.

Many of my games, have scripts that rely on checking when an animation has fully finished playing. (And not stopped prematurely for any reason)

To do this, I simply name the last keyframe “End”. (Or in MoonAnimator, I add a Marker named “End”) I’ve been doing this for a long time.

Actual Behavior
When going to the demo place, the output it will show if the “End” keyframe was reached on either animation. At the moment, it only prints successfully for “Wave Fixed”.

This is true with all the animations in any of my games that have a unique keyframe name at the very end of an animation. It simply does not trigger. Many things have broken due to this.

Workaround
I’ve also tried switching to GetMarkerReachedSignal, but still no luck.

The only solution I’ve found is if I go edit an animation and add a new keyframe, one frame before the very end and name that new keyframe “End”.

But I’d like to avoid that if possible, especially if this is a simple bug to fix. Otherwise I would need to go through 100+ animations.

Issue Area: Engine
Issue Type: Other
Impact: Moderate
Frequency: Constantly
Date First Experienced: 2022-03-02 00:03:00 (-05:00)
Date Last Experienced: 2022-03-05 00:03:00 (-05:00)

3 Likes

I also experienced this, but I was using animation events as well. It used to work, but I suspect the phase 2 rollout of Animation Engine - Runtime Changes and Fixes has caused this in some way. I switched to using .Stopped:Connect() for now.

1 Like

Ah, yeah maybe that could be where the issue stems from.

I have tried .Stopped:Connect() as well, but there is still the issue with animations ending prematurely. I need to check when an animation is fully complete and has ended.

Thanks for the report. We are already aware of this issue and we’ll follow up when we have an update.

4 Likes

Yes, I have the same problem with GetMarkerReachedSignal
GetMarkerReachedSignal cannot be triggered by events on the last frame of the animation

This was a simple bug fix. I patched it today, which should see it hit production in next week’s regular update. You can disable Workspace.AnimationWeightedBlendFix for now to resolve it, and test again when this fix is live. You should not have to republish any animations.

4 Likes

Thanks for the fix, very much appreciated!

Hello. The new weekly update has been released but this is still not fixed in either the Studio or Player clients.