KeyframeReached deprecated?

Just found out that KeyframeReached has been deprecated but can it still be used? If so how do I name keyframes? The option no longer appears like it used to.
The devhub suggests :GetMarkerReachedSignal , but it doesn’t explain how exactly its used, how do I use it?

Hey there!
Deprecated features do still work, however it is not recommended to use them.

The :GetMarkerReachedSignal can be used after you insert an AnimationEvent into the animation you need to make it work on.

:GetMarkerReachedSignal() requires only one argument and that is the name of the AnimationEvent that you have created.

How to create an AnimationEvent

It is really simple. All you need to do is RightClicking on the timeline in the basic AnimationEditor and then Making the AnimationEvent itself. You can pass arguments into them as well that can be used later in the script!

EDIT: You can just click on this button in the Animation Editor.

You can read more about the AnimationEvents over here.

Example script
AnimationTrack:GetMarkerReachedSignal("AnimationEventName"):Connect(function(yourArgument)
    print(tostring(yourArgument))
end)

I hope this was helpful!
Have a nice day!

1 Like

Ah I get that, but how do I name the keyframes? I don’t see that option anymore when I right click on them.

You can name them at the time you are creating them.

I’d like to show you a picture taken from Studio, but unfortunatelly, I got falsely banned (I’ve made an appeal, waiting for answer), so I’m not able to do so.

Oh no that’s unfortunate. Hope you recover your account.

1 Like