Table of Contents
Overview
Creating custom animations in Roblox lets your characters move in ways that match your exact game style. Instead of relying only on default walking and jumping, you can design unique attacks, dances, emotes, or special actions. In this chapter you learn how to create, export, and use your own animations inside Roblox Studio, and how to connect them to scripts.
Preparing a Character for Animation
To create character animations, you need a rig. A rig is a character model that is already set up with joints. Roblox studio can generate these for you.
Open Roblox Studio and create a new place or use your existing game. From the top menu, open the Plugins tab. Click the Rig Builder button. You can choose R15 or R6 rigs. R15 has 15 body parts with more joints and smoother animation. R6 has 6 main parts and is more simple. For most modern games, R15 is the better choice.
Insert a rig, for example a Block Rig, into your scene. The rig appears in the Workspace and is usually named something like R15 Rig. This rig is just for animation work inside Studio. Players in your game will use their own characters, but you will create animations on this test rig.
Make sure the rig is selected and look in the Explorer. You should see parts like UpperTorso, RightUpperArm, LeftLowerLeg, and a Humanoid object. The presence of these joints and the Humanoid is what allows the Animation Editor to work correctly.
Using the Animation Editor
Roblox Studio includes an Animation Editor plugin that lets you keyframe motions over time. With your rig selected, open the Plugins tab and click the Animation Editor button. A window appears and asks you to select which rig to animate. Click on your rig in the 3D view or in the Explorer.
The first time, the editor will ask you to name your new animation. Use a clear name, such as SwordSlash or WaveEmote. The editor timeline will appear at the bottom of the screen. You see a timeline with time values in seconds, and a hierarchy of body parts on the left.
The timeline cursor shows the current time of the animation. You can drag it to move forward or backward in time. At time 0, the rig is in its default pose. Every time you pose the character and set a keyframe, the editor stores that pose at the current time.
Creating Keyframes and Poses
A keyframe is a saved pose for one or more body parts at a specific time. The animation is simply the smooth motion between these keyframes. To start, move the timeline cursor to time 0. Select a body part, such as RightUpperArm, in the 3D view. You see rotation handles that allow you to rotate the limb.
Pose the character in the starting position you want. For example, if you are making a wave, you might raise the right arm slightly. Once you move the limb, the Animation Editor automatically creates keyframes for that part at the current time. You can also press the keyframe button in the editor to insert keyframes manually.
Next move the timeline cursor to a later time, for example 0.5 seconds. Now change the pose again. For the wave, raise the right arm high, bend the elbow slightly, and rotate the hand to face outward. Once you release the mouse, new keyframes appear at 0.5 seconds for the parts you moved.
You can create more wave motions by moving to 1 second, changing the arm position, then to 1.5 seconds, changing it again, and so on. The editor interpolates between these keyframes. This is called tweening, where the program fills in the in between frames for you.
Use the play button in the Animation Editor to preview the motion. If something looks wrong, you can select a keyframe diamond on the timeline and move it left or right to change the timing, or you can click it and delete it if needed. You can adjust poses at any time; the editor updates the keyframes when you move the parts.
Controlling Timing and Playback
The feel of an animation depends heavily on timing. Slow, smooth motions are good for idle or emotes, while quick, sharp motions fit attacks or dodges. The total length of the animation is the highest time value with keyframes. You can set the animation length in the editor by changing the duration field or by dragging the end marker.
If your animation plays too slowly, select keyframes and drag them closer together on the timeline. If it is too fast, spread them further apart. You can also adjust the playback speed later with code, but getting a good baseline timing in the editor makes testing easier.
The Animation Editor includes options such as loop and priority. Looping is important when you want an animation to repeat. For example, an idle breathing animation should loop continuously. A punch animation should usually play once and stop.
Priority decides which animation wins if two try to control the same body parts. For instance, an emote might need to override the default running animation for the upper body. You can set the priority in the animation settings inside the editor window. Typical values are Core, Idle, Movement, and Action, where Action is the strongest.
Important rule: Use looped animations for continuous actions such as idle, and non looped animations for one time actions such as attacks. Set animation priority so that important actions, such as attacks or emotes, override basic movement when necessary.
Polishing Poses and Transitions
Once you have basic motion, you can refine it. Good animation includes anticipation, follow through, and weight. Even simple Roblox characters benefit from these ideas.
Anticipation is a small movement in the opposite direction before the main action. For example, when a character waves, they might pull the arm down slightly before lifting it up. You can add a small keyframe at, for example, 0.1 seconds with a slight opposite motion to make the wave feel more lively.
Follow through is the motion that continues after the main action. When the arm finishes a big wave, it does not instantly stop. Instead, it overshoots a little and then settles. You create this by adding a keyframe after the main pose with a small overshoot, and one more keyframe where the arm returns to rest.
You can also adjust the curve type for transitions in the editor. Roblox animations use easing styles to control how fast the motion starts and stops. Linear easing keeps a constant speed, while other styles like Sine or Quad ease in or out. In the Animation Editor, you can select keyframes and change the easing style and direction. Use ease in for motions that start gently then speed up, and ease out for motions that start quickly and then slow down.
Saving and Exporting Animations
When you are happy with the animation, you must save and export it so scripts can use it. In the Animation Editor, click the Save button. This stores the animation data in your place. To use it in game, click Export. The editor will prompt you to log in if needed and then upload to Roblox.
After export, Studio gives you an asset ID. This is a numeric value, for example 1234567890. You can copy it from the export dialog or from the URL if you open the animation in a browser. This ID is how your scripts will refer to the animation.
If you later edit the animation, you can choose to overwrite the existing asset or upload as a new one. Overwriting keeps the same ID so your scripts keep working. Uploading as new creates a different ID, and you need to update your scripts.
Important rule: Always keep track of your animation asset IDs. If you overwrite an animation, the ID stays the same. If you upload a new one instead, you must update any scripts that reference the old ID.
Playing Animations with Scripts
To play a custom animation in game, you use the Animator or Humanoid:LoadAnimation system. For R15 characters, each player character has a Humanoid object inside their model. Scripts can load your exported animation asset and play it.
Create an Animation object in a script. In the Explorer, you can insert an Animation under a script, or create it with code. Set the AnimationId property to "rbxassetid://YourAnimationID". The format always includes rbxassetid:// followed by the number. For example:
local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://1234567890"
To play it on a character, you need a reference to the character's Humanoid and its Animator. In many cases you can call Humanoid:LoadAnimation(animation) and then :Play() on the returned object. For example, inside a LocalScript that reacts to a button press:
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local function playWave()
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://1234567890"
local track = humanoid:LoadAnimation(animation)
track:Play()
end
The variable track is an AnimationTrack. It represents one running instance of your animation. You can call track:Stop() to stop it early. You can also control speed with track:AdjustSpeed(value) where a value of $1$ means normal speed, $0.5$ is half speed, and $2$ is double speed.
You must play character animations from the correct environment, usually a LocalScript for the local player when it is a cosmetic or input driven action. For some systems you might trigger server side animations. The details of RemoteEvents and client server differences are covered elsewhere. Here, it is enough to know that your scripts must reach the correct Humanoid or Animator before calling play.
Looping, Stopping, and Blending Animations
Some animations are meant to loop, such as idle breathing or holding a pose. Others should play once. In the Animation Editor you can set the animation as looping or not. The AnimationTrack also has a Looped property that you can control by script. For example:
track.Looped = true
track:Play()To stop a looping animation, call:
track:Stop()Animations can blend together, for example walking while playing an upper body emote. Proper priority settings in the animation asset help with this. A higher priority animation can override certain joints while leaving the rest to the default animations.
You can also fade transitions by using the :Play(fadeTime) and :Stop(fadeTime) parameters, where fadeTime is the number of seconds for a smooth blend. For instance:
track:Play(0.2) -- fade in over 0.2 seconds
track:Stop(0.2) -- fade out over 0.2 secondsThis prevents sudden snaps between poses and gives your game a more polished look.
Important rule: Manage your AnimationTrack objects carefully. Keep references to tracks you want to stop later, and use fade times when you play or stop them to avoid harsh motion changes.
Testing and Troubleshooting Animations
Testing custom animations in Roblox Studio is essential because what looks good on the test rig may behave differently on a live character. Use the Play button in Studio to enter Play mode. Your player character spawns with its own Humanoid. Trigger your script that plays the animation and watch how it looks in real time.
If the animation does not play at all, check the following. Confirm that the AnimationId is correct including the rbxassetid:// prefix. Make sure the rig type matches. Animations made for R15 characters do not work correctly on R6 and the other way around. Check that the script is actually running and reaching the :Play() call. The Output window in Studio can show errors if something fails.
If only part of the body moves, verify that you animated the correct rig type and that there are no conflicting animations with higher priority running at the same time. If your animation seems too slow or too fast, you can either change the timeline in the Animation Editor or adjust speed in code. If the character snaps into strange poses, double check that you did not create unwanted keyframes for body parts at odd times. You can remove these in the editor and export again.
Over time, you will build a library of custom animations for your game like unique jumps, landings, attacks, reactions, and emotes. By combining solid timing in the editor with careful playback control in scripts, your game gains personality and clarity that default animations cannot provide.