Animation
Animation : Instance
Overview
The animation Object references an animation's Asset Id.
For AnimationTrack to replicate correctly, an animator must be a child of a humanoid. Animations started on a player's client are automatically replicated to the server and other clients.
Properties
AnimationId
string
Sets the Asset Id of the animation referenced by the Animation Object.
The Asset Id is generated when the animation is imported.
Code Samples
local Players = game:GetService("Players")
local Character = Players.LocalPlayer.Character
local Humanoid = Character:WaitForChild("Humanoid")
local Animation = Instance.new("Animation")
Animation.AnimationId = "ovdrassetid://18850100" -- WinAnimation01
local Animator = Humanoid:FindFirstChild("Animator")
local AnimationTrack = Animator:LoadAnimation(Animation)
AnimationTrack:Play()
Methods
Events
See also
Character AnimationLast updated