This item is not replicated across Roblox’s server/client boundary.
This property can only be read from. Attempting to write to it will cause an error.
The Speed of an
AnimationTrack is a read only property that gives the current playback speed of the
AnimationTrack. This has a default value of 1. When speed is equal to 1, the amount of time an animation takes to complete is equal to
AnimationTrack/Length (in seconds).
If the speed is adjusted, then the actual time it will take a track to play can be computed by dividing the length by the speed. Speed is a unitless quantity.
Speed can be used to link the length of an animation to different game events (for example recharging an ability) without having to upload different variants of the same animation.
This property is read only and is changed using
In this example a player and an animation is loaded. The Length of an AnimationTrack determines how long the track would take to play if the speed is at 1. If the speed is adjusted, then the actual time it will take a track to play can be computed by dividing the length by the speed.
Playing Animation for a Specific Duration
The following function will play an AnimationTrack for a specific duration. This is done by changing the speed of the animation to the length of the animation divided by the desired playback duration. This could be used in situations where a developer wants to play a standard animation for different duration (for example, recharging different abilities).