# Set Expression

The **Set Expression** instruction allows you to change the **facial blendshape** of a character.

For example, you can make your character look **in pain** when taking damage by triggering this instruction on an **Attribute Change** trigger, or make them look **happy** during dialogue.

***Expressions** are exported during **cache generation** from the **runtime facial demo animation controller** included in the **FREE Starter Pack - S***~~***i***~~***dekick Modular Characters** asset*

### Inside the Instruction

#### Sidekick Character

The character to apply the facial expression to.

#### Expression

Select which facial expression to apply.\
There are **over 19 expressions** available, including:

* In Pain
* Happy
* Sad
* Angry
* Surprised
* Neutral\
  …and more

#### Transition

Defines how smoothly the expression changes.\
Enter a **transition duration** (in seconds).

If the **Transition** value is greater than **0**, additional options appear:

* **Easing:** Choose how the blendshape transitions (e.g., Linear, Ease In, Ease Out).
* **Time Mode:** Select whether to use **Game Time** or **Unscaled Time** for the transition.
* **Wait to Complete:** When enabled, the instruction **waits until the transition finishes** before continuing to the next instruction in your sequence.

***

### **Example Use Case**

You can make your character look **in pain** when taking damage using an **On Attribute Change** trigger.

For example:

1. Create a **Trigger** with **On Attribute Change (HP)** as the event.
2. Inside the trigger, add the **Set Expression** instruction.
3. Assign your **Sidekick Character** and choose the **“In Pain”** expression.
4. (Optional) Add a short **Transition** time (like 1.2s) for a smoother, natural reaction.

Now, whenever the character loses HP, their facial expression will change to show pain.

<figure><img src="https://756218607-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fv2D32cRkVCHsF9VcmKPA%2Fuploads%2FADNCSbYCFxGX43sRWfMJ%2FUnity_ZtQ0Tz1vzp.png?alt=media&#x26;token=a9ef9d63-3721-473c-b9e6-59edc3947005" alt="" width="375"><figcaption></figcaption></figure>
