Is there a way to find the length of an animation in a script?

I’m working on a finishing move system similar to Criminality or Combat Warriors, and I want to kill the player after the animation has finished. How can I tell how long the animation is?

animation.Stopped:Connect(function()

end
ianimation.TimeLength