Using the Animation Editor
Using the Animation Editor
Roblox Studio features a powerful, built-in Animation Editor which allows you to design and publish custom animations.
Launching the Editor
To launch the animation editor:
- Click the Animation Editor button in the Plugins tab.
- Select the rig to define animations for. Note that the editor will only accept a model which meets the requirements outlined below.
- Type in a new animation name and click Create in the dialog. The editor window will open, showing an empty tracklist and the animation timeline. Tracks will populate in the tracklist as keyframes are added to the animation.
Animations can be applied to both stock human characters and non-human models, as long as they meet these requirements:
- The model must contain a part named HumanoidRootPart, even if it’s not human in appearance.
- All of its moving parts must be connected with
- The HumanoidRootPart must also connect to the rest of the model via a
Using Default Rigs
If you’re new to Roblox animation, we recommend that you start with one of the default rigs created through the Build Rig button in the Plugins tab. These rigs already contain the basic parts and mechanisms to build a character animation.
To animate a rig, you’ll need to define poses by moving/rotating specific parts like the head, right hand, left foot, etc. When the animation runs, it will smoothly animate the rig from pose to pose.
Consider a simple animation where a human character turns its head 45° to the left. This animation involves two poses — the initial position of the head (looking forward) and the turned position of the head (looking left).
To create a new pose:
- Drag the scrubber bar to the frame position where you want to set the pose, for example 15. Animation authoring is based on 30 frames per second, so 15 is equivalent to ½ second.
Hover your mouse over the rig and click on a part to select it, or select the part by clicking its name in the left side of the editor window.
Before you move or rotate the part to its desired orientation, note the “mode” settings in the lower-left corner of the 3D editor window:
- After changing the part’s orientation, a new keyframe will be created in the timeline, indicated by a diamond symbol.
- If there is no keyframe after the previous keyframe, the previous keyframe will be duplicated at the new time position.
- If you press K while the scrubber bar is between two keyframes, a new keyframe will be inserted which matches the part's interpolation at that time position.
- Continue moving or rotating parts until you get the desired pose. Each time you adjust a specific part, a keyframe is defined for that part at the position of the scrubber bar.
- When you’re ready to preview the animation, press the small Play button in the upper-left section of the editor window. Animations can also be played/paused with the P key.
Adjusting the Total Time
By default, an animation begins with a total duration of 2 seconds. If you need to add or remove time, enter a new value (in total seconds) in the right-side box of the Time indicator:
You can also add or remove time from the current position of the scrubber bar by selecting Edit → Add Time At Cursor or Remove Time At Cursor. Note that if you remove a block of time, keyframes within it will not be permanently deleted, but rather hidden. Re-including that block of time will restore those keyframes to their relative position in the timeline.
Working With Keyframes
Once you define basic poses for a rig, fine-tuning individual keyframes can significantly improve the final animation.
To increase or decrease the amount of time between a keyframe and a neighboring keyframe:
- Click on any keyframe in the timeline. Alternatively, you can select all keyframes at a specific time position by clicking the diamond symbol in the upper bar. Selected keyframes will be surrounded with a blue border.
- Drag the keyframe(s) left or right into a new time position.
A specific keyframe (or keyframes for multiple parts) can be copied and pasted to a new position in the timeline.
- Select one or more keyframes as outlined in step #1 of the section above.
- Press Control+C (Command ⌘+C on Mac).
- Move the scrubber bar to a new time position.
- Press Control+V (Command ⌘+V on Mac). The keyframe(s) will be copied to that position.
One or more keyframes can be deleted by simply selecting them and pressing Delete or Backspace.
Easing is an important concept in animation. By default, a part will move/rotate from one keyframe to the next in an even, steady motion known as linear easing.
As you can see, linear easing makes the character’s kick animation appear very stiff. While that may look nice for some animations, changing the easing method between keyframes can make an animation appear more natural.
Compare the following video where cubic easing is applied to make the leg animate more naturally between keyframes.
To change easing for one or more keyframes:
- Select the keyframe(s).
- Right-click and select Easing Options from the popup menu.
- Select an easing direction and style from the available options. To experiment with different settings as the animation runs, enable looping, press Play, and adjust the easing for the desired keyframes.
When animating characters, inverse kinematics (IK) can help calculate rotations for a group of joints in order to get one specific joint to a desired location. This is very useful for an animation like kicking, where moving the foot upwards would cause the upper and lower leg to rotate to simulate the knee bending.
To use IK in the animation editor:
- The rig must be an R15 and it must have the proper joint naming conventions (see the
Articles/r6 vs r15 avatars|R15 chart).
- Attachments between parts must have matching names. For example, an attachment named LeftWristRigAttachment should exist for both LeftHand and LeftLowerArm.
If all of the requirements are met, an Apply IK button will appear next to the model name in the animation editor.
To begin editing an animation in IK mode:
- Click the Apply IK button in the animation editor. You should see a notification in Studio that IK has been applied to the joints.
- Make sure that the manipulation mode is set to Move (toggle with R key).
- Grab any part and translate it. The IK solver will try to rotate any parent body parts to get that joint into the proper position. You can also manipulate the part in Rotate mode, but rotation will be limited by the physical constraints.
While in the “forward kinematics” mode (default mode), you may have made certain transformations that go outside of the physics constraint limits used by the IK solver. When going into IK mode, you’ll be prompted to correct any keyframes which have transforms outside of these limits. Note that this is optional and that it can be a lengthy process for complex animations.
IK features both Body Part Mode and Full Body Mode which can be toggled from the IK dropdown.
|Body Part Mode||Full Body Mode|
|Isolates movement to related limbs. For example, moving the RightHand part will only affect parts that compose the right arm.||The IK solver will consider all joints when moving a specific part. However, you may exclude specific parts from this process by pinning them (see below).|
When editing an animation in Full Body Mode, you can pin a part to make it immovable, but only if it’s not the part you’re manipulating. In the following video, both feet are pinned and remain stationary while moving other parts, but either foot can still be directly manipulated.
To pin a specific part, click the pin icon next to its name. Remember that Full Body Mode must be enabled to use this feature.
Exiting IK Mode
To return to “forward kinematics” mode, click on the IK dropdown and select Disable IK. Note that this will not remove any manipulations you made while in IK mode — that data will remain stored in any keyframes which were created while IK was applied. Exiting IK mode simply removes the physical constraints from the rig and allows you to freely manipulate parts.
When designing an animation in the editor, you can toggle on the Looping button to make it automatically loop:
Note, however, that a looping animation will not interpolate between the last keyframe and first keyframe. Therefore, it’s recommended that the last keyframe is identical to the first keyframe, ensuring that the animation loops smoothly.
In an actual game, you’ll probably use unique animations for different player actions and states, for instance a jump animation and an “idle” animation. Logically, the jump animation should take priority over the idle animation so that characters don’t perform both at the same time.
You can set one of four priority levels for an animation via Edit → Set Priority in the editor window. In a game, if you play an animation with a higher priority than one that’s already playing, the new animation will override the old.
Priority dictates how an overall animation will be handled in a game, but sometimes you may want two animations to run simultaneously. For example, a “wave” animation might play at the same time a character is walking.
When creating an animation in the editor, you can exclude certain parts from participating in the overall animation by clicking the lock symbol next to the part name:
Animation events allow you to create named markers across the span of the timeline. As the animation runs, these events can be detected with the
AnimationTrack/GetMarkerReachedSignal|GetMarkerReachedSignal() function. This is useful if you want to play a sound or perform some other action at specific points in the animation playback.
To create a new event marker:
- Position the scrubber bar at the point along the timeline where the event should occur.
- Click the Edit Animation Events button to edit markers at the selected time position.
- In the popup window, click Add Animation Events and then click CreateNewEvent.
- Type in and confirm the new event name.
- In the next view, you can enter a Parameter string, outlined in more detail below.
- When ready, click Save to register the event. In the events bar of the editor, you’ll see a new marker symbol at the selected time position.
As you create new events, they will become available for usage throughout the animation, not only at the time position where you created them. For instance, you might create a “FootStep” event marker at the point where a character’s left foot touches down, then use the same event when the character’s right foot touches down.
To reuse an event:
- Position the scrubber bar at the point along the timeline where the event should occur.
- Click the Edit Animation Events button, just as if you were creating a new event.
- In the popup window, click Add Animation Events and select the desired event from the list.
- In the next view, enter a new Parameter string (or the same) depending on your needs.
- Click Save to register the event.
Managing Events Globally
To browse and manage all of an animation’s events, click the Manage Animation Events button:
In the popup, you can rename existing events or delete unneeded events on a global basis.
To detect animation events in a
Script, connect a function to the
AnimationTrack/GetMarkerReachedSignal|GetMarkerReachedSignal() function of
AnimationTrack, for instance:
local Players = game:GetService("Players") local character = Players.LocalPlayer.Character if not character then character = Players.LocalPlayer.CharacterAdded:Wait() end local humanoid = character:WaitForChild("Humanoid") -- Create new 'Animation' instance local walkAnim = Instance.new("Animation") walkAnim.AnimationId = "rbxassetid://5432167890" -- Load animation onto the humanoid local walkAnimTrack = humanoid:LoadAnimation(walkAnim) walkAnimTrack:GetMarkerReachedSignal("FootStep"):Connect(function(paramString) -- Perform desired action here, i.e. play a custom footstep sound print(paramString) end)
As noted above, you can specify a Parameter value for any event marker within the animation editor. This lets you pass a custom string (single value, comma-separated string, etc.) to the
AnimationTrack/GetMarkerReachedSignal|GetMarkerReachedSignal() function as illustrated by the
paramString argument in the code example above. This string can then be parsed or converted, if necessary, and used for whatever action you wish to perform in the event.
Saving and Exporting
Once you’re satisfied with an animation, you can either save it locally or export it to Roblox for use in your games.
To save the animation locally, select File → Save from the animation editor window. Note that this save is specific to the animation editor and is not used to load the animation in a game (see the next section for details on exporting an animation for in-game use).
Exporting to Roblox
To use an animation in an actual game, you must export it to Roblox and note the assigned asset ID.
- In the animation editor window, select File → Export.
- Select whether to create a new animation or overwrite an existing one. Proceed as prompted to upload the animation.
- Once the upload is complete, make note of the asset ID inside the provided URL. This ID will be required when scripting animations.
Animations can be imported into the animation editor for modification, but only if you exported the animation or it was exported as a group animation for a
Articles/Group Games|group you belong to.
To import an animation, select File → Import and locate the animation in the dialogue window.