Class · inherits Instance
Animation
References an animation asset which can be loaded by an
AnimationController.
About Animation
An object that references an animation asset
(AnimationId) which can be loaded by an
AnimationController.
Loading an Animation on Client or Server
In order for AnimationTracks to replicate correctly,
it's important to know when they should be loaded on the client or on the
server:
If an
Animatoris a descendant of aHumanoidorAnimationControllerin a player'sPlayer.Character, animations started on that player's client will be replicated to the server and other clients.If the
Animatoris not a descendant of a player character, its animations must be loaded and started on the server to replicate.
The Animator object must be initially created on the server and
replicated to clients for animation replication to work at all. If an
Animator is created locally, then
AnimationTracks loaded with that Animator will
not replicate.
See also Animation Editor and Using Animations to learn how to create and add pre-built or custom animations to your game.
Properties 2
AnimationContent
: ContentA reference to the animation asset associated with thisAnimation.The
Content-typed reference to the animation asset for thisAnimation. It is the underlying storage forAnimationIdand accepts animation asset URIs; setting either property updates the other.Requires
Animationsecurity and is not accessible from regular scripts. For most use cases, useAnimationIdinstead, which provides unrestricted access to the same animation reference as a string content ID.AnimationId
: ContentIdAsset ID of the animation anAnimationobject is referencing.This property is the asset ID of the animation an
Animationobject is referencing. Once an animation has been created and uploaded to Roblox, the ID can be copied from the Creator Dashboard.Note that the animation will need to be loaded onto an
AnimationTrackin order to play it.
Animation also has every member of Instance. Deprecated and Roblox-only members are hidden.
Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com · Studio 0.743.0.7431133.