AnimChannel:GetClosestKeyID(when)

Version added: before 9.5

Returns the closest keyframe to the left from the given frame

ArgumentTypeDescriptionDefaultVersion added
whenint32Frame numberbefore 9.5

Return type (int32): the closest keyframe id

Returns the closest keyframe to the left from the given frame. If the given frame has a key, then that keyframe is returned.