Moods

A mood is a type of facial animation for animatable heads that loops indefinitely, allowing users to express themselves and react to others with a persistent facial emotion. Moods play simultaneously with other character default animations, such as walking, climbing, and swimming, and if the default animation has a facial animation, the default animation blends with the character's mood.

Default mood
Open mouth mood

Creating Moods

If you have a character model with an animatable head, you can create any mood animation you can think of using the Face Animation Editor. If you don't want to use the Blocky or Goblin reference character models, you can create or modify an existing model to support animated heads in a third-party modeling software, such as Blender or Maya. For information on how to create an animatable head, see Creating Basic Heads.

To create a mood:

  1. Add a character model with an animatable head to the viewport.

  2. Open the Face Animation Editor.

    1. In the menu bar, navigate to the Avatar tab.

    2. In the Animation section, click on the Animation Editor. The Animation Editor window displays.

    3. In the viewport, select your character model with an animatable head. A dialog displays.

    4. In the Animation Name field, enter a new animation name, then click the Create button. The Animation Editor window displays the media and playback controls, timeline, and track list.

    5. In the track list of the Animation Editor, click the Face button. The Face Animation Editor displays to the left of the track list.

  3. In the Face Animation Editor, adjust sliders for the facial parts you want to manipulate. Animation tracks for each facial part you manipulate automatically display in the track list along with keyframes for your current position in the timeline. The character's face also updates in the viewport.

    • To undo a step on a slider, press CtrlZ (Z).
    • To redo a step on a slider, press CtrlY (Y).
    • To reset a slider to its default value, right click on the slider. A contextual menu displays. Select Reset Selected.
  4. When you are finished creating your animation, navigate to the Media and Playback Controls and click the button. A pop-up menu displays.

  5. Select Save or Save As to save the mood animation. The animation displays in the Explorer window as a child of the AnimSaves object (itself a child of the rig).

  6. (Optional) To assign an asset ID to your mood animation and save it to the Toolbox to use across your experiences,

    1. In the Explorer window, right-click on your new mood animation. A contextual menu displays.

    2. Select Save to Roblox. The Asset Configuration dialog displays.

    3. Fill in the following fields:

      • Title: A name for your plugin.
      • Description: A description that describes what a potential user should expect the plugin to do.
      • Creator: The creator you'd like to attribute as the creator of the plugin.
    4. Click the Submit button. After a moment, the Asset Configuration dialog displays your mood's Animation.AnimationID that you can use to set the mood to characters within your experiences.

Setting Moods

Every character with an animatable head has a child Animate LocalScript with a child mood StringValue that contains the mood animation that plays on the character's head. The mood animation's default Animation.AnimationID plays a smiling animation, but you can change the character's mood to something else by either directly editing the Animation.AnimationID within the mood StringValue, or using the HumanoidDescription system.

Editing AnimationIds

You can set a specific mood for each character within your experience by editing their mood's Animation.AnimationID whenever a user triggers an event. For example, the following Script edits any previously set mood to an animation that opens the character's mouth as soon as the user enters the experience:


local Players = game:GetService("Players")
local function onCharacterAdded(character)
local humanoid = character:WaitForChild("Humanoid")
local animateScript = character:WaitForChild("Animate")
animateScript.mood.Animation1.AnimationId = "rbxassetid://7715145252" -- Mood
end
local function onPlayerAdded(player)
player.CharacterAppearanceLoaded:Connect(onCharacterAdded)
end
Players.PlayerAdded:Connect(onPlayerAdded)

Using the HumanoidDescription

You can also use the HumanoidDescription system to find user characters and edit their AnimationIDs for any default animation. For example, the following Script edits any previously set mood to an animation that gives the character a half-smile on the left-side of their face whenever their character is idling:


local humanoid = player.Character and player.Character:FindFirstChild("Humanoid")
if humanoid then
local descriptionClone = humanoid:GetAppliedDescription()
descriptionClone.IdleAnimation = 10725833199
-- Apply modified "descriptionClone" to humanoid
humanoid:ApplyDescription(descriptionClone)
end

Disabling Moods

To disable moods from your experience, you can delete the mood object underneath the Animate LocalScript. For example, the following Script removes every character's mood StringValue as soon as they join the experience:


local Players = game:GetService("Players")
local function onCharacterAdded(character)
local humanoid = character:WaitForChild("Humanoid")
local animateScript = character:WaitForChild("Animate")
animateScript.mood:Destroy()
end
local function onPlayerAdded(player)
player.CharacterAppearanceLoaded:Connect(onCharacterAdded)
end
Players.PlayerAdded:Connect(onPlayerAdded)