Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Getting the Animation Time?

Asked by
RoyMer 301 Moderation Voter
9 years ago

Is there anyway to get the animation time in seconds?

or maybe an event that fires when the Animation stops playing?

Is this the proper way to use KeyframeReached?

function DB()
enabled = true  
end
animation.KeyframeReached:connect(DB)

1 answer

Log in to vote
2
Answered by
1waffle1 2908 Trusted Badge of Merit Moderation Voter Community Moderator
9 years ago

You can use AnimationTrack.KeyframeReached to tell you each keyframe's name when it is reached.

0
Hey I edited the thread, is that the proper way how I had to use it? Because I cannot figure out if the problem is coming from that or something else? RoyMer 301 — 9y
0
Humanoid:LoadAnimation(Animation) returns the AnimationTrack object. KeyframeReached is fired at every keyframe in the animation. 1waffle1 2908 — 9y
0
Oh thanks I got a feeling I understood RoyMer 301 — 9y
Ad

Answer this question