Roblox UtilitiesDevlHub Roblox Documentation

Class

Animation

Inherits
Instance › Object
Memory category
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 Animator is a descendant of a Humanoid or AnimationController in a player's Player.Character, animations started on that player's client will be replicated to the server and other clients.

  • If the Animator is 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#

AnimationContentContentA reference to the animation asset associated with this Animation.ReadSafe
AnimationIdContentIdAsset 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
Inherited from Object 6
Properties (2)

ClassName, className

Events (1)

Changed