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.
BodyPart appearances are applied using
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.
Can be dynamically rescaled by using special
NumberValue objects parented inside of the Humanoid.
The Humanoid will automatically create
Vector3Value objects named OriginalSize inside of each limb.
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 functionlocal myPart = script.Parentlocal db = true -- debounce (See above for explanation on Debounce)-- only runs when the event happensmyPart.Touched:Connect(function(partTouched)local character = partTouched.Parentlocal hum = character:FindFirstChild("Humanoid")if db and hum thenlocal plr = game.Players:FindFirstChild(character.Name)print(plr.Name.." changed the color of the block")db = falsemyPart.BrickColor = BrickColor.Random()wait(5)endend)