Lesson 8 of 12
Animation: the Animation Editor, Moon Animator, Animator
Learn Roblox animation from the wrench swing. Author keyframes in the Animation Editor, compare Moon Animator 2 and Blender, play tracks with Animator, set priorities and weights, use markers, and publish with the right owner.
By the end you can
- Author a short swing in the Studio Animation Editor and publish it to the right owner
- Load and play it from a LocalScript with Animator and AnimationTrack, and know when it replicates
- Choose a priority, blend with weights, and fire gameplay from an animation event marker
- Pick between the Animation Editor, Moon Animator 2 and Blender for a job
Before this: The wrench: tools, raycasts, tags
1The swing you see is a separate thing
Swing the wrench and two different things happen. The server raycasts and decides the hit. Your own device plays an arm movement so the swing looks like a swing. The movement is decoration; the hit never waits for it.
A swing at m06. The arm motion is an animation played on the client.
Transcript
- 0:00 The server accepted the swing, so the swing sound can play.
- 0:01 The include list is only the Drone tag. The ground is not a hit.
- 0:04 The bar stays where it was.
At m06-drone-wrench the arm motion comes from an uploaded animation whose id lives in Ids.WRENCH_ANIMATION_ID (m07-feel renames this key to WRENCH_SWING_ANIMATION). The repo ships that id as 0, and then the swing plays no animation at all and prints one [Ids] warning. This lesson is how you make your own, and how m07-feel re-authors it.
You run Beacon Yard with WRENCH_ANIMATION_ID still 0. What happens when you swing?
Answer
The swing still fires and can hit; only the arm movement is missing. fireSwing calls playSwing, which returns early when the id is missing, and then fires the Swing remote anyway. Gameplay never depends on an animation loading.
Open this step in lesson mode · Link to this step · This confused me
2Rigs, poses and keyframes
An animation moves the joints of a RigRigA model whose parts are joined by movable joints, so an animation can pose it.Think of it as a puppet with hinges at every joint.: a model whose parts are connected by joints such as Motor6D or bones. Roblox characters come in two rigs. R15 has 15 body parts, with elbows and knees. R6 is the legacy rig with 6 parts. Studio's Rig Generator (Avatar > Character or Home > Character) inserts either, and only R15 can wear layered clothing1.
An animation is a list of poses on a timeline. You pose the rig at one moment, move the scrubber, pose it again, and the editor fills the motion in between. Each stored pose of a part is a keyframe. Studio animates at 30 frames per second by default, so 0:15 on the timeline is half a second2.
Your game uses players' own avatars, many of which wear layered jackets. Which rig should you animate the swing on?
Answer
R15. Layered clothing works only on R15, and an animation authored on one rig type does not drive the other's joints. Beacon Yard keeps the platform avatar, which is R15 by default.
Open this step in lesson mode · Link to this step · This confused me
3The Studio Animation Editor
The Animation Editor opens from Studio's Avatar tab (or Window > Avatar). Select a rig, then:
- Scrub to a frame and rotate a joint. A keyframe appears on that part's track. Press
Rto switch between move and rotate. - Right-click keyframes to set an easing style (Linear, Constant, CubicV2, Elastic, Bounce) and direction (In, Out, InOut).
- Use ⋯ > Set Animation Priority and the Looping button.
- Save keeps a
KeyframeSequencein ServerStorage. That is your working file, not something the game should play. - ⋯ > Publish to Roblox uploads it and gives you an asset id. Pick the group in the Creator field if a group owns the game.

Select a numbered pin, or a row below, to read what it marks.
The resting pose the swing starts from in Play. Your authored swing raises this arm back, snaps it forward to the Impact marker, and settles back here.
Put the workflow for a new wrench swing in order.
Answer
1. Insert an R15 rig and select it in the Animation Editor 2. Pose the start, the wind-up and the impact on the timeline 3. Set easing on the keyframes and the priority to Action 4. Publish to Roblox under the experience's owner 5. Put the asset id in Ids.local.luau and press Play. Rig, poses, polish, publish, then point the game at the new id. Saving alone only stores a KeyframeSequence in ServerStorage.
Open this step in lesson mode · Link to this step · This confused me
4Animation Editor, Moon Animator 2 or Blender
The built-in editor is enough for a 0.4-second swing. Studios also use two other tools, and pick by the job.
Where Roblox animators work
| Option | What it is | When pros pick it | Trade-offs |
|---|---|---|---|
| Studio Animation Editor | Roblox's built-in keyframe editor, with a curve editor, IK and animation events. | Most gameplay animations: swings, emotes, idles. Free and always up to date with the engine. | Fewer layering and camera tools than dedicated packages. |
| Moon Animator 2 | A paid Creator Store plugin for animating inside Studio. | Cutscenes and animations that move cameras, lights and several rigs together. Common among Roblox-native animators. | A one-person third-party plugin: you depend on it being maintained, and its project files are its own. |
| Blender | A free, open-source 3D suite; you animate a rig and export FBX. | Studios with 3D artists, complex characters, and teams that also model in Blender. | The rig must match Roblox's joint names, and every change is an export and an import. |
| Maya | Autodesk's commercial animation package, used across the games industry. | Animators coming from console or film pipelines; Roblox documents a Maya export path. | A paid licence and the same FBX round trip as Blender. |
FBX animations from Blender or Maya come in through the editor's ⋯ > Import > From FBX Animation, onto a rig whose joints use Roblox's names3. After that they publish like anything made in Studio.
Match each job to the tool most teams would reach for first.
Answer
A 0.4-second wrench swing: Studio Animation Editor; A 20-second intro cutscene with a moving camera: Moon Animator 2; A rigged drone the art team modelled in Blender: Blender, exported as FBX. Simple gameplay motion stays in Studio, cinematics suit Moon Animator's scene tools, and an asset built in Blender is animated where its rig lives.
Open this step in lesson mode · Link to this step · This confused me
5Animator plays an AnimationTrack
To play an animation from code you need three objects. An Animation holds the asset id. The Animator, a child of the character's Humanoid, loads it and returns an AnimationTrack. The track is what you play, stop, speed up and listen to4.
local function playSwing(character: Model)
local animationId = Ids.asset(Ids.WRENCH_ANIMATION_ID)
if animationId == nil then
return
end
local humanoid = character:FindFirstChildOfClass("Humanoid")
if humanoid == nil then
return
end
local animator = humanoid:FindFirstChildOfClass("Animator")
if animator == nil then
local created = Instance.new("Animator")
created.Parent = humanoid
animator = created
end
if swingTrack == nil then
local animation = Instance.new("Animation")
animation.AnimationId = animationId
local loaded, track = pcall(function()
return animator:LoadAnimation(animation)
end)
if not loaded or typeof(track) ~= "Instance" then
return
end
swingTrack = track :: AnimationTrack
end
swingTrack:Play(0.05, 1, 1.35)
Play(fadeTime, weight, speed) fades the track in over fadeTime seconds to weight, at speed times normal5. The wrench uses a 0.05-second fade, full weight and 1.35 times speed.
Suppose your swing animation is 0.6 seconds long at speed 1. playSwing plays it at speed 1.35. How long does one swing take, in seconds? Round to two decimals.
Answer
0.44 seconds (within 0.01). 0.6 / 1.35 ≈ 0.44 seconds, just above the server's 0.4-second swing gap, so a fast clicker never outruns the animation by much.
Open this step in lesson mode · Link to this step · This confused me
6Who sees your animation
Animations break a rule you learned early: that a client's changes never travel up. The Animator handles replication itself. If the Animator belongs to a player's character, animations that player's client plays are replicated to the server and to every other client. Anything else, such as an NPC, must be animated from the server6.
Both sidesRemember: Replication is the live broadcast.
There is one catch. The Animator itself must be created on the server. The Roblox docs say that tracks loaded on an Animator created locally do not replicate. Read playSwing again: when no Animator is found, it creates one on the client.
playSwing runs on a character whose Humanoid has no Animator, so it creates one with Instance.new on the client. Who sees the swing?
Answer
Only the swinging player; tracks on a locally created Animator do not replicate. Replication runs through an Animator the server created. Default characters always get one, so this branch is a fallback; the m07 rewrite waits for the real Animator instead of creating one.
Open this step in lesson mode · Link to this step · This confused me
7Priorities and blending
While you swing, the default walk or idle animation is also playing. Both want to move your arm. Priority settles it. From highest to lowest: Action4, Action3, Action2, Action, Movement, Idle, Core. Roblox's default character animations play at Core, and the rest are yours7. For each joint, the engine evaluates tracks from high priority to low and stops once the weights add up to 1. Tracks at the same priority blend by weight: two Action tracks that both move the same arm, at weights 0.5 and 0.5, give a half-and-half pose, and the level 3 test's blend_same_rank checks exactly this. The cell below only models the stop rule.
-- A simplified model of the documented rule, for one joint.
local tracks = {
{ name = "Swing", rank = 4, weight = 1 },
{ name = "Walk", rank = 2, weight = 1 },
{ name = "Idle", rank = 1, weight = 1 },
}
table.sort(tracks, function(a, b) return a.rank > b.rank end)
local used = 0
for _, track in tracks do
if used >= 1 then
print(track.name, "ignored")
else
local share = math.min(track.weight, 1 - used)
used += share
print(track.name, share)
end
end
Swing 1
Walk ignored
Idle ignoredIn the cell, change Swing's weight to 0.5. What does the model print for Walk?
{ name = "Swing", rank = 4, weight = 0.5 }
Answer
Walk 0.5. Swing fills half the joint, so evaluation continues and Walk takes the remaining 0.5. Idle is then ignored. Lower weights let a swing blend with the walk instead of replacing it.
Open this step in lesson mode · Link to this step · This confused me
8Animation events ring a doorbell
A swing has a moment that matters: the impact. You can mark it on the timeline as an animation event, say Impact. In code, track:GetMarkerReachedSignal("Impact") returns a signal that fires each time playback passes that marker, with an optional parameter string8. Sound and sparks can wait for it.
A signal is a doorbell. Connect wires a function to it, and every ring runs the function. The animation rings the Impact bell when it reaches the marker.
Think of it as A doorbell
Both sidesRemember: An event and :Connect is a doorbell.
Markers are for presentation. The server must never wait for an Impact marker to apply damage: the marker fires on the client, and a cheater's client can fire it whenever it likes, or never.
After twenty swings, each impact plays the clang twenty times. Which line causes it?
local function playSwing()
local track = getTrack()
track:GetMarkerReachedSignal("Impact"):Connect(playClang)
track:Play(0.05, 1, 1.35)
end
Answer
Line 3: track:GetMarkerReachedSignal("Impact"):Connect(playClang). Fixed: Connect the marker once, when the track is first loaded, not on every swing. Every call adds another connection to the same cached track, so one marker runs every connected function. Connect once when you load the track, or keep the connection and disconnect it.
Open this step in lesson mode · Link to this step · This confused me
9Uploading and ownership
A published animation is an asset with an owner, either you or a group. Roblox only plays it in a game that is allowed to use it: one owned by the same creator, or one you have granted permission to from the asset's Permissions page on the Creator Dashboard9. If the game belongs to a group, publish the animation to that group. An animation published to your personal account will not play in a group's game unless you grant it.
In Beacon Yard the id never goes in a commit. You put it in src/shared/Ids.local.luau, which Git ignores, and Ids.luau merges it over the default 0.
Your team's game is owned by a group. You paste in the ID of a Restricted personal animation without granting the game access. What do players see?
Answer
No swing: the group's game is not allowed to use your personal asset until you grant it. Animations play where their owner allows. Publish to the group, or grant the game permission on the asset's Permissions page.
Open this step in lesson mode · Link to this step · This confused me
10Where the doorbell picture breaks
A doorbell rings once per press and you hear it once. Signals are not that tidy. Answer first, then open the breakdown.
Where does it break?“A doorbell” is a good picture of an event and :connect. Where does it stop being true?
It breaks here. One visit can ring many times (Touched fires per body part), handlers have no promised order, and a chime you never unwire keeps ringing: connections leak until you disconnect them.
The true model. An RBXScriptSignal calls every connected handler each time it fires, possibly deferred to the next resumption point. Handlers must tolerate repeats and must be disconnected when their owner goes away.
CombatClient loads swingTrack the first time you swing and never clears it. You die and respawn with a new character. Which Animator does the next swing's track belong to?
Answer
The old character's Animator, destroyed with the old body. After the first swing swingTrack is never nil again, so a respawn keeps the track from the destroyed Animator. The m07 rewrite keeps one track per Animator and loads a new one for each new character.
Open this step in lesson mode · Link to this step · This confused me
11Build it: re-author the swing for m07
Build along
src/client/CombatClient.luausrc/shared/Ids.luausrc/shared/Ids.local.example.luau
In a new Baseplate, open Avatar > Character (or Home > Character) to launch the Rig Generator and insert a Block Rig, R15.
You should see An R15 rig named Rig appears at the origin of a new Baseplate.
Open the Animation Editor, select the rig and pose the right arm: rest, raised back, swung forward.
You should see Three keyframes on the RightUpperArm and RightLowerArm tracks: rest at 0:00, wind-up at 0:06, impact at 0:12. Playback swings the arm in under half a second.
Show animation events from the timeline settings, move the scrubber to 0:12, and add an event named
Impact.You should see A marker named Impact sits on the event track at 0:12.
Set the priority with ⋯ > Set Animation Priority > Action.
You should see The priority menu shows Action ticked.
Publish with ⋯ > Publish to Roblox, choosing the owner of your copy of Beacon Yard as the Creator.
You should see Asset Configuration closes and the editor shows the new asset id.
Check out
m07-feel, copyIds.local.example.luautoIds.local.luauif you have not, and setWRENCH_SWING_ANIMATION(atm06-drone-wrenchthe key was namedWRENCH_ANIMATION_ID;m07-feelrenamed it).You should see Ids.local.luau holds WRENCH_SWING_ANIMATION = your id, and git status does not list the file.
Press Play and swing. Then reset your character from the Roblox menu and swing again. With the m06 code the cached track still belongs to the old character; m07 loads a fresh track per Animator so this step passes.
You should see Swinging plays your new arm motion. After you reset your character, the next swing still animates.
Open this step in lesson mode · Link to this step · This confused me
12Challenges
Level 1, Apprentice
Challenge
Slow the swing to half speed and see that gameplay does not change.
- Start from
- m07-feel, with your own WRENCH_SWING_ANIMATION
Done means
- At speed 0.5 the swing is visibly slow, and hits still land at the same rate
- The speed is 1.35 again afterwards
Hints
- The third argument of Play is the speed.
- The server's swing gap does not read the animation.
Level 2, Builder
Challenge
Time the swing sound to the impact frame.
- Start from
- m06-drone-wrench, with your own swing published with an Impact marker
Done means
- The swing sound plays at the Impact marker, not at the click
- Twenty swings still play one sound per swing
- Damage is still decided by the server raycast
Hints
- Connect GetMarkerReachedSignal once, when the track is loaded.
- SoundClient already knows how to play the swing sound.
A teammate suggests applying wrench damage when the server hears that the Impact marker fired. Why is that a bad idea?
Answer
The marker fires on the client, so the client could report it at any time. Anything the client reports is a request. Damage stays with the server's own checks and raycast; the marker only times effects.
Level 3, Professional
Challenge
Fix the respawn bug and model blending in challenges/animation_work.luau on m14-ship. The check models animation tracks without loading an animation. Press Play and run game.ServerScriptService.RunGameTests:Invoke("animation") in the server command bar.
- Start from
- The game at milestone m14 (download)
- Grade it
- In Studio, press Play, then run
game.ServerScriptService.RunGameTests:Invoke("animation")in the server command bar. Copy the pass code from Output.
Done means
- challenges/animation_work.luau caches one track per Animator and reloads for a new Animator
- Its blend function follows the priority and weight rule from this lesson
- challenges/animation.luau prints TEST PASS for track_cached, track_per_animator, blend_override, blend_share and blend_same_rank
Hints
- Key the cache table by the Animator, not by the Animation.
- Sort by rank, highest first, and stop handing out weight once the joint is full.
- Tracks with the same rank share what is left in proportion to their weights.
Open this step in lesson mode · Link to this step · This confused me
13Recap
Recap
- An animation is posed keyframes on a rig (R15 or legacy R6), authored in the Animation Editor, Moon Animator 2 or Blender, and published under the owner of the game.
- Animator:LoadAnimation returns an AnimationTrack; tracks a player's client plays on its own character replicate, but only on a server-created Animator.
- Priority decides which track moves a joint, weights blend tracks, and markers fire signals that time effects, never damage.
An event and :Connect is a doorbell, until one visit can ring many times (Touched fires per body part), handlers have no promised order, and a chime you never unwire keeps ringing: connections leak until you disconnect them.
Replication is the live broadcast, until only property changes in some containers are sent, and nothing a client changes ever travels back up to the server.
Queued for review
Open this step in lesson mode · Link to this step · This confused me