To set an animation in Roblox Studio, create the animation with the Animation Editor, export it, then use the animation’s asset ID in a script to load and play it on a humanoid or rig.

Basic steps

  1. Open Roblox Studio and make sure you have a rig or character model to animate.
  2. Go to the Animation Editor and create your animation by moving body parts and adding keyframes.
  1. Export or publish the animation so Roblox gives it an asset ID.
  1. In a script, create an Animation object, set AnimationId to your uploaded animation ID, and load it with the character’s Animator.
  1. Play the resulting animation track when needed, such as on spawn, touch, or a button press.

Example script

lua

local humanoid = script.Parent:WaitForChild("Humanoid")
local animator = humanoid:WaitForChild("Animator")

local anim = Instance.new("Animation")
anim.AnimationId = "rbxassetid://YOUR_ANIMATION_ID"

local track = animator:LoadAnimation(anim)
track:Play()

Common issues

  • The animation may not play if the AnimationId is wrong or not owned by the account/group that owns the experience.
  • The character usually needs a Humanoid with an Animator inside it for the animation to load correctly.
  • If the animation seems stuck or not smooth, check keyframe timing and animation priority in the editor.

Quick note

Roblox’s official docs explain that animations are loaded through scripts, and the asset ID from the exported animation is what connects the editor work to gameplay.