Returns the duration of a single loop cycle for the group, as determined by its child animations. Total duration is based on the durations, delays, and order of child animations; see example for details.


duration = AnimationGroup:GetDuration()


  • duration - Total duration of all child animations (in seconds) (number)


<AnimationGroup name="Pulse">
  <Alpha name="$parentIn" change="1" duration="0.1"/>
  <Alpha name="$parentOut" change="-1" duration="1.5"/>
-- contains two animations which are implicitly ordered, so
-- group duration is the sum of the animation durations: 1.6 sec

<AnimationGroup name="Alarm">
 <Alpha name="$parentIn" change="1" duration="0.5" order="1"/>
 <Rotation name="$parentJiggleLeft" degrees="-15" duration="0.25" startDelay="0.35" order="1"/>
 <Rotation name="$parentJiggleRight" degrees="30" duration="0.5" order="2"/>
 <Rotation name="$parentJiggleStop" degrees="-15" duration="0.25" endDelay="0.25" order="3"/>
 <Alpha name="$parentOut" change="-1" duration="0.5" order="4"/>
-- contains delays and multiple animations, some of which are concurrent, so
-- group duration is the maximum duration (including delay) of concurrent animations
-- plus the sum of durations and delays for sequential animations:
-- max(0.5, 0.25 + 0.35) + 0.5 + (0.25 + 0.25) + 0.5 = 2.1 sec