Play One-Off Animations on Entities in Minecraft
The /playanimation command in Minecraft Bedrock Edition makes one or more entities play a one-off animation. You can target yourself, other players, or specific mobs using target selectors and animation strings.
Map makers and server creators often use this command to make custom cutscenes, add movements to NPCs, or test animation files from a resource pack. Because it is a Game Directors level command, you must turn on cheats in your world settings before you can run it.
/playanimation <entity: target> <animation: string> [next_state: string] [blend_out_time: float] [stop_expression: string] [controller: string]Play animation
| Argument | Type | What it means |
|---|---|---|
animation | string | Required. A `string` that is a single word or quoted `string` that refers to an animation name or an animation JSON file in a resource pack. |
blend_out_time | float | |
controller | string | Optional. A `string` that is an animation controller name or a new file defined in a resource pack. |
entity | target | Required. A `string` or `target selector` to identify the entity. |
next_state | string | |
stop_expression | string |
/playanimation @s animation.player.bobMakes your own character play the player bobbing animation.
/playanimation @p animation.humanoid.sneakingMakes the nearest player play the humanoid sneaking animation once.
/playanimation @a animation.player.sleeping defaultMakes all players in the world play the sleeping animation and sets their next state to default.
/playanimation @r animation.player.riding.arms default 0.5Makes a random player play the riding arms animation with a 0.5 blend out time.
/playanimation @e[type=villager] animation.villager.general.yesMakes all loaded villagers play their head-nodding yes animation.
/playanimation @e[type=zombie,c=1] animation.zombie.attack_bare_handMakes the closest zombie play its bare-handed attack animation.
/playanimation @e[type=pig,r=10] animation.quadruped.walk state_idle 0.25Makes all pigs within a 10-block radius play the quadruped walk animation with a next state and a 0.25 blend out time.
/playanimation @e[type=armor_stand] "animation.armor_stand.salute_pose" state_default 0.0 "stop_now" controller.animation.armor_stand.poseMakes all armor stands play a quoted salute pose animation using every optional argument including a stop expression and controller.
Minecraft Java Edition does not have a /playanimation command. This command is exclusive to Minecraft Bedrock Edition.
You must be playing Minecraft Bedrock Edition and have cheats enabled in your world settings, as this command requires the Game Directors permission level and does not exist in Java Edition.
Yes, the animation and controller arguments accept strings that refer to custom animation JSON files and animation controllers defined inside an active resource pack.
Use the @e target selector with a type filter in the entity argument, such as @e[type=villager], to target specific mobs instead of players.