7 min read

Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.

NPC kit

Note

The content of this project and documentation can be used under Roblox's Limited Use License.

NPCs (non-player characters) can add a lot of depth to a game. All of the following NPCs can be visually customized, their behavior modified, and the zombie/soldiers can even defend an area by attacking players or other characters using a tag system to set behavior.

To use an NPC in your game:

  1. Select one of the following NPC kits:

Drooling Zombie

Soldiers

RO-01 Robots

NP-C 9000 Robots

  1. On the NPC's item page, click the green Get button and confirm the transaction.

  2. In Studio, open the Toolbox.

  3. Select your toolbox Inventory section.

  4. Locate the NPC and click it to add it into the place.

Character structure

Each NPC model typically contains the following objects:

Object name or [Type] Type Description
Animations [`Folder`](/docs/folder) Contains [`Animations`](/docs/animation), such as an `AttackAnimation` or `DeathAnimation`.
Initial Poses [`Folder`](/docs/folder) Contains posing information.
[Animate](#animate) [`Script`](/docs/script) Loads and plays animations on the character rig. See [Animate](#animate) for more details.
[Accessory] [`Accessory`](/docs/accessory) One of possibly multiple [`Accessories`](/docs/accessory) for the NPC such as hats, weapons, etc.
Health [`Script`](/docs/script) Typically regenerates the [`Humanoid`](/docs/humanoid) health over time. Disabling this will prevent the character from regenerating health.
Humanoid [`Humanoid`](/docs/humanoid) Manages [`Humanoid`](/docs/humanoid) related properties, such as [`Humanoid.Health`](/docs/humanoid#humanoid-health), [`Humanoid.WalkSpeed`](/docs/humanoid#humanoid-walkspeed), [`Humanoid.DisplayDistanceType`](/docs/humanoid#humanoid-displaydistancetype), etc.
NPC [`Script`](/docs/script)

Defines character-specific behaviors such as roaming, attacking, etc. Parents the following objects:

Maid (ModuleScript) defines a class useful in releasing resources used.

Ragdoll (ModuleScript) defines a function that transforms a character into a loose physics-affected body (parents a RigTypes ModuleScript that defines several helper functions).

RbxNpcSounds [`Script`](/docs/script) Defines and manages behavior related to character sound effects like running, dying, etc.
[BodyParts](#bodyparts) [`BasePart`](/docs/basepart) Various character body parts attached to the HumanoidRootPart or neighboring body parts through Motor6D or constraint objects. See [BodyParts](#bodyparts) for more details.
HumanoidRootPart [`BasePart`](/docs/basepart) A special invisible part that's considered the root of the rig; this is also the `PrimaryPart` of the character's [`Model`](/docs/model).
[Configuration](#configuration) [`Configuration`](/docs/configuration) Contains value objects which tune various behaviors. See [Configuration](#configuration) for more details.

Note

Square brackets [] refer to the object in general and the name doesn't matter. For example, [Model] refers to the weapon's Model and you can rename it to whatever makes sense.

Design notes

When using the NPC kit, keep in mind the following design notes:

Animate

The Animate Script in the NPC Model handles animation related configurations and contains the following objects:

Object name or [Type] Type Description
ScaleDampeningPercent [`NumberValue`](/docs/numbervalue) Defines how animation speeds are modified as the character is scaled (less than 1 implies animation playback scales inversely as a character is scaled).
PlayEmote [`BindableFunction`](/docs/bindablefunction) This can be invoked by other scripts in order to force the assumption of a pose.
[Pose] [`StringValue`](/docs/stringvalue) Reference to a playable animation category such as idle, jump, walk, etc. This object can parent any number of [`Animations`](/docs/animation).

These [`Animations`](/docs/animation) parent a **Weight** ([`NumberValue`](/docs/numbervalue)) that prioritizes one of multiple animations to play while the pose is assumed; typically used to add variety to idle and dance poses.

BodyParts

The BodyPart BasePart in the NPC Model represent the various character body parts and contains the following objects:

Object name or [Type] Type Description
AvatarPartScaleType [`StringValue`](/docs/stringvalue) Determines how the part will be scaled; values can be **Classic**, **ProportionsNormal**, or **ProportionsSlender**.
OriginalSize [`Vector3Value`](/docs/vector3value) Determines the size of the part when the character scaling is 1.
[Attachment] [`Attachment`](/docs/attachment) Defines a point relative to the individual part which scripts, effects, and objects such as a [`Tool`](/docs/tool) or [`Accessory`](/docs/accessory) may utilize during positioning.
[Motor6D] [`Motor6D`](/docs/motor6d) An animated joint between two body parts. Note that [`Animator`](/docs/animator) depends on the name of [`Motor6Ds`](/docs/motor6d) to be consistent with that of the [`Motor6Ds`](/docs/motor6d) used when an animation was created, so avoid renaming this object.
[Joint] [`WeldConstraint`](/docs/weldconstraint), [`Constraint`](/docs/constraint), [`JointInstance`](/docs/jointinstance) A non-animated joint between two body parts.
[Sound] [`Sound`](/docs/sound) Commonly found in the head or `HumanoidRootPart`; plays sounds from within the rig as controlled by the `RbxNpcSounds` script.

Configuration

Each NPC includes a Configuration object within its hierarchy which acts as a container of value objects. These are used by the NPC script to tune various behaviors. Unless otherwise specified, these apply to all of the characters.

Object name or [Type] Type Description
DestroyOnDeath [`BoolValue`](/docs/boolvalue) Causes the entire NPC to be destroyed shortly after it dies. Disable this for ragdolls to be persistent.
PatrolEnabled [`BoolValue`](/docs/boolvalue) Causes the NPC to wander in an area around its starting position.
PatrolRadius [`NumberValue`](/docs/numbervalue) Defines the maximum distance an NPC will wander from its starting position, assuming **PatrolEnabled** is true.
RagdollEnabled [`BoolValue`](/docs/boolvalue) Causes the NPC to go limp when it dies, instead of breaking apart.
AttackDamage [`NumberValue`](/docs/numbervalue) Defines how much health is lost by a victim when attacked by the NPC. This applies for Zombie and Soldier kits only.
AttackDelay [`NumberValue`](/docs/numbervalue) Defines the minimum number of seconds between shots. This applies for Soldier kits only.
AttackMode [`NumberValue`](/docs/numbervalue) Specifies what the soldier will attack, based on the [tagging system](#assign-tags). This applies for Soldier kits only.
AttackRadius [`NumberValue`](/docs/numbervalue) Defines the maximum distance the NPC must be from a potential victim before it attempts to attack. This applies for Zombie and Soldier kits only.
ClipCapacity [`NumberValue`](/docs/numbervalue) Defines how many bullets the soldier can fire before needing to reload. This applies for Soldier kits only.
ReloadDelay [`NumberValue`](/docs/numbervalue) Defines how many seconds must pass before the soldier's weapon clip is reloaded. This applies for Soldier kits only.

Assign tags

The NPC script uses CollectionService tags to manage aggression toward other characters and players. Various tags from the following table can be assigned as follows:

Tag Purpose
**SoldierEnemy** or **SoldierFriend** Determines if a soldier, based on its **AttackMode** configuration value, should attack another character. When the soldier's **AttackMode** is set to `1`, other characters must be tagged with **SoldierEnemy** to be considered attackable. When the soldier's **AttackMode** is set to `2`, all objects without the **SoldierFriend** tag are considered attackable. When the soldier's **AttackMode** is set to `3`, these tags are ignored entirely and the soldier will attack all characters.
**ZombieFriend** This tag is used by the zombie to determine whether it should not attack a character. When applied, the zombie becomes docile toward the tagged character.