The Humanoid is a special object that gives models the functionality of a character. It grants the model with the ability to physically walk around and interact with various components of a Roblox level. Humanoids are always parented inside of a
Model, and the model is expected to be an assembly of
Motor6D; the root part of the assembly is expected to be named HumanoidRootPart. It also expects a part named Head to be connected to the character’s torso part, either directly or indirectly. By default, there are two official types of character rigs supplied by Roblox, each with their own set of rules:
A basic character rig that uses 6 parts for limbs.
The Head part must be attached to a part named Torso, or the Humanoid will die immediately.
More complex than R6, but also far more flexible and robust.
Uses 15 parts for limbs.
The Head part must be attached to a part named UpperTorso or the Humanoid will die immediately.
BodyPart appearances have to be assembled directly.
- If a NumberValue is parented inside of the Humanoid and is named one of the following, it will be used to control the scaling functionality:
You'll reuse this code in your game.
-- Player = This is you! For example, your userid
-- Humanoid - models the functionality of you
-- Character - Your appearance in the game
-- : connects a function
local myPart = script.Parent
local db = true -- debounce (See above for explanation on Debounce)
-- only runs when the event happens
local character = partTouched.Parent
local hum = character:FindFirstChild("Humanoid")
if db and hum then
local plr = game.Players:FindFirstChild(character.Name)
print(plr.Name.." changed the color of the block")
db = false
myPart.BrickColor = BrickColor.Random()