Getting animation length passed and starting an animation at a specified time?

I was wondering if it was possible to get the length that has been played on an animation.

For example if I play a 1 second animation and its halfway complete the length would return 0.5. Then I was also wondering if there was a way to start an animation at a specific length. E.g starting the animation halfway through.

To get the time passed you would use AnimationTrack.TimePosition

local AnimTrack = Humanoid:LoadAnimation(Animation)

print(tostring(AnimTrack.TimePosition).."/"..tostring(AnimTrack.Length).." has passed.")

To start the animation at a specific length you would just set the TimePosition to your liking then play the animation

5 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.