Class
Animation
References an animation asset which can be loaded by an
AnimationController.
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#
AnimationContentContent | A reference to the animation asset associated with this Animation.ReadSafe |
AnimationIdContentId | Asset ID of the animation an Animation object is referencing.ReadSafe |
AnimationContent: Content#
ReadSafe
The Content-typed reference to the animation asset for this
Animation. It is the underlying storage for
AnimationId and accepts animation asset
URIs; setting either property updates the other.
Requires Animation security and is not accessible from regular scripts.
For most use cases, use AnimationId instead,
which provides unrestricted access to the same animation reference as a
string content ID.
AnimationId: ContentId#
ReadSafe
This property is the asset ID of the animation an Animation object
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
AnimationTrack in order to play it.
Inherited members#
Inherited from Instance 58
Properties (10)
Archivable, archivable, Capabilities, IsInSandbox, Name, Parent, PredictionMode, RobloxLocked, Sandboxed, UniqueId
Methods (39)
AddTag, children, ClearAllChildren, Clone, clone, Destroy, destroy, FindFirstAncestor, FindFirstAncestorOfClass, FindFirstAncestorWhichIsA, FindFirstChild, findFirstChild, FindFirstChildOfClass, FindFirstChildWhichIsA, FindFirstDescendant, GetActor, GetAttribute, GetAttributeChangedSignal, GetAttributes, GetChildren, getChildren, GetDebugId, GetDescendants, GetFullName, GetStyled, GetStyledPropertyChangedSignal, GetTags, HasTag, IsAncestorOf, IsDescendantOf, isDescendantOf, IsPropertyModified, QueryDescendants, Remove, remove, RemoveTag, ResetPropertyToDefault, SetAttribute, WaitForChild