How to access animation info when playing it from server?

I’ve looked through animation object documentation and stuff, I don’t really know if it’s possible to view but I was curious as to whether there was like an AnimationLength property that I can view from server on an animation loaded from the server? (I am using Humanoid:LoadAnimation) off an animation object in replicatedstorage.

alternatively I was going to time it to see how long it is but that feels tedious.
I need the length for certain functions in my code.

1 Like

I would recommend using the animator when loading/playing animations. This is how you would get animation length.

local Animation --Animation Object
local Character --Roblox Character Model

local Humanoid = Character:WaitForChild("Humanoid")
local Animator = Humanoid.Animator

local LoadedAnimation = Animator:LoadAnimation(Animation)

local Length = LoadedAnimation.Length

print(Length)
2 Likes

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