Kinemium Docs

Humanoid

Controls character movement, state, rigging, animation, accessories, and tools.

Functions

`isVec3`

`isCF`

`flat`

`copy`

`signals`

`props`

`controller`

`characterOf`

`ownerRoot`

`localOwner`

`shouldSimulate`

`canSim`

`stanceOffset`

`shouldLogHumanoidRoot`

`speedMul`

`markRigPart`

`partFor`

`buildRig`

`encodeRigDescriptor`

`decodeRigDescriptor`

`exportRigDescriptor`

`defaultRig`

`inferRigDescriptorFromCharacter`

`syncRoot`

`segPose`

`poseOffset`

`applyPose`

`setState`

`updateStance`

`isSeated`

`reportSpeed`

`restoreRigFromDescriptor`

`humanoidDefaultPose`

`configureAnimator`

`getAnimator`

`getAssociatedPlayer`

`getRegistry`

`createObject`

`bind`

`h:BindRig`

Binds a rig definition to the humanoid without creating default parts.

`h:BuildRig`

Builds rig parts from a rig definition and binds them to the humanoid.

`h:CreateDefaultRig`

Creates and binds a default humanoid rig.

`h:RestoreRig`

Restores rig bindings from the current rig descriptor or character parts.

`h:GetRigPart`

Returns a rig part by binding or indexed segment name.

`h:GetRigChain`

Returns the ordered part chain for a rig binding.

`h:GetRigBindings`

Returns the active rig binding table.

`h:SetAnimator`

Sets the animator instance or pose provider used by this humanoid.

`h:SetPoseOffset`

Sets an additional pose offset for a rig binding.

`h:ClearPoseOffset`

Clears a pose offset for a rig binding.

`h:SetSpeedModifier`

Adds or replaces a named movement speed multiplier.

`h:RemoveSpeedModifier`

Removes a named movement speed multiplier.

`h:SetIKCallback`

Sets a callback that can override or add inverse-kinematics pose data.

`h:GetEffectiveWalkSpeed`

Returns WalkSpeed after sprint, crouch, and custom modifiers are applied.

`h:SetSprinting`

Enables or disables sprinting and updates stance state.

`h:SetCrouching`

Enables or disables crouching and updates stance state.

`h:ToggleCrouch`

Toggles the crouching state.

`h:EquipTool`

Equips a Tool by parenting it to the character and activating equip hooks.

`h:UnequipTools`

Unequips all Tool children from the character.

`h:AddAccessory`

Adds an Accessory to the character and tracks it for rig attachment.

`h:RemoveAccessory`

Removes a tracked Accessory from the humanoid.

`h:GetAccessories`

Returns all accessories currently tracked by the humanoid.

`h:Move`

Sets the humanoid's world-space movement direction.

`h:MoveRelative`

Sets movement from a local direction relative to a CFrame or look-vector provider.

`h:Face`

Sets the desired world-space facing direction.

`h:ClearFacingDirection`

Clears the explicit facing direction so movement can drive rotation again.

`h:Stop`

Clears current movement input.

`h:RequestJump`

Queues a jump request for the next simulation step.

`h:CanDash`

Returns whether the dash cooldown has finished.

`h:Dash`

Starts a dash in the given direction when the cooldown allows it.

`h:GetState`

Returns the humanoid controller's current state.

`h:GetRootCFrame`

Returns the current root part CFrame, or identity when no root exists.

`h:GetLookVector`

Returns the current horizontal look vector.

`h:GetFocusPosition`

Returns the camera focus position for the current stance.

`stepHumanoid`


isVec3

Arguments

v

Returns

This function returns nothing.

isCF

Arguments

v

Returns

This function returns nothing.

flat

Arguments

v

Returns

This function returns nothing.

copy

Arguments

tbl

Returns

This function returns nothing.

signals

Arguments

This function takes no arguments.

Returns

This function returns nothing.

props

Arguments

This function takes no arguments.

Returns

This function returns nothing.

controller

Arguments

This function takes no arguments.

Returns

This function returns nothing.

characterOf

Arguments

h

Returns

This function returns nothing.

ownerRoot

Arguments

h

Returns

This function returns nothing.

localOwner

Arguments

h, game

Returns

This function returns nothing.

shouldSimulate

Arguments

h, game

Returns

This function returns nothing.

canSim

Arguments

h

Returns

This function returns nothing.

stanceOffset

Arguments

h

Returns

This function returns nothing.

shouldLogHumanoidRoot

Arguments

root, interval

Returns

This function returns nothing.

speedMul

Arguments

h

Returns

This function returns nothing.

markRigPart

Arguments

part, isRoot

Returns

This function returns nothing.

partFor

Arguments

name, parent, spec, isRoot, createInstance

Returns

This function returns nothing.

buildRig

Arguments

parent, bindings, createInstance

Returns

This function returns nothing.

encodeRigDescriptor

Arguments

descriptor

Returns

This function returns nothing.

decodeRigDescriptor

Arguments

rawDescriptor

Returns

This function returns nothing.

exportRigDescriptor

Arguments

root, bindings

Returns

This function returns nothing.

defaultRig

Arguments

options

Returns

This function returns nothing.

inferRigDescriptorFromCharacter

Arguments

char, root

Returns

This function returns nothing.

syncRoot

Arguments

h

Returns

This function returns nothing.

segPose

Arguments

pose, name, i

Returns

This function returns nothing.

poseOffset

Arguments

h, bindingName, segName, i

Returns

This function returns nothing.

applyPose

Arguments

h, rootCF, pose

Returns

This function returns nothing.

setState

Arguments

h, c, nextState

Returns

This function returns nothing.

updateStance

Arguments

h

Returns

This function returns nothing.

isSeated

Arguments

h

Returns

This function returns nothing.

reportSpeed

Arguments

h, c, speed

Returns

This function returns nothing.

restoreRigFromDescriptor

Arguments

h, c

Returns

This function returns nothing.

humanoidDefaultPose

Arguments

animator, humanoid, context

Returns

This function returns nothing.

configureAnimator

Arguments

animator, autoEnableDefaults

Returns

This function returns nothing.

getAnimator

Arguments

h, createIfMissing, createInstance

Returns

This function returns nothing.

getAssociatedPlayer

Arguments

humanoid

Returns

This function returns nothing.

getRegistry

Arguments

This function takes no arguments.

Returns

This function returns nothing.

createObject

Arguments

className

Returns

This function returns nothing.

bind

Arguments

def

Returns

This function returns nothing.

h:BindRig

Binds a rig definition to the humanoid without creating default parts.

Arguments

def: any

Returns

Model?

h:BuildRig

Builds rig parts from a rig definition and binds them to the humanoid.

Arguments

def: any

Returns

Model?

h:CreateDefaultRig

Creates and binds a default humanoid rig.

Arguments

options: table

Returns

Model?

h:RestoreRig

Restores rig bindings from the current rig descriptor or character parts.

Arguments

This function takes no arguments.

Returns

boolean

h:GetRigPart

Returns a rig part by binding or indexed segment name.

Arguments

name: string

Returns

any

h:GetRigChain

Returns the ordered part chain for a rig binding.

Arguments

name: string

Returns

{ any }?

h:GetRigBindings

Returns the active rig binding table.

Arguments

This function takes no arguments.

Returns

table

h:SetAnimator

Sets the animator instance or pose provider used by this humanoid.

Arguments

animatorOrProvider: any

Returns

any

h:SetPoseOffset

Sets an additional pose offset for a rig binding.

Arguments

name: string, offset: CFrame

Returns

This function returns nothing.

h:ClearPoseOffset

Clears a pose offset for a rig binding.

Arguments

name: string

Returns

This function returns nothing.

h:SetSpeedModifier

Adds or replaces a named movement speed multiplier.

Arguments

key: any, mult: number

Returns

This function returns nothing.

h:RemoveSpeedModifier

Removes a named movement speed multiplier.

Arguments

key: any

Returns

This function returns nothing.

h:SetIKCallback

Sets a callback that can override or add inverse-kinematics pose data.

Arguments

source: any, callback: function

Returns

This function returns nothing.

h:GetEffectiveWalkSpeed

Returns WalkSpeed after sprint, crouch, and custom modifiers are applied.

Arguments

This function takes no arguments.

Returns

number

h:SetSprinting

Enables or disables sprinting and updates stance state.

Arguments

on: boolean

Returns

This function returns nothing.

h:SetCrouching

Enables or disables crouching and updates stance state.

Arguments

on: boolean

Returns

This function returns nothing.

h:ToggleCrouch

Toggles the crouching state.

Arguments

This function takes no arguments.

Returns

This function returns nothing.

h:EquipTool

Equips a Tool by parenting it to the character and activating equip hooks.

Arguments

tool: any

Returns

This function returns nothing.

h:UnequipTools

Unequips all Tool children from the character.

Arguments

This function takes no arguments.

Returns

This function returns nothing.

h:AddAccessory

Adds an Accessory to the character and tracks it for rig attachment.

Arguments

accessory: any

Returns

This function returns nothing.

h:RemoveAccessory

Removes a tracked Accessory from the humanoid.

Arguments

accessory: any

Returns

This function returns nothing.

h:GetAccessories

Returns all accessories currently tracked by the humanoid.

Arguments

This function takes no arguments.

Returns

{ any }

h:Move

Sets the humanoid's world-space movement direction.

Arguments

dir: Vector3

Returns

This function returns nothing.

h:MoveRelative

Sets movement from a local direction relative to a CFrame or look-vector provider.

Arguments

localDir: Vector3, ref: any

Returns

This function returns nothing.

h:Face

Sets the desired world-space facing direction.

Arguments

dir: Vector3

Returns

This function returns nothing.

h:ClearFacingDirection

Clears the explicit facing direction so movement can drive rotation again.

Arguments

This function takes no arguments.

Returns

This function returns nothing.

h:Stop

Clears current movement input.

Arguments

This function takes no arguments.

Returns

This function returns nothing.

h:RequestJump

Queues a jump request for the next simulation step.

Arguments

This function takes no arguments.

Returns

This function returns nothing.

h:CanDash

Returns whether the dash cooldown has finished.

Arguments

This function takes no arguments.

Returns

boolean

h:Dash

Starts a dash in the given direction when the cooldown allows it.

Arguments

dir: Vector3?

Returns

boolean

h:GetState

Returns the humanoid controller's current state.

Arguments

This function takes no arguments.

Returns

Enum.HumanoidStateType

h:GetRootCFrame

Returns the current root part CFrame, or identity when no root exists.

Arguments

This function takes no arguments.

Returns

CFrame

h:GetLookVector

Returns the current horizontal look vector.

Arguments

This function takes no arguments.

Returns

Vector3

h:GetFocusPosition

Returns the camera focus position for the current stance.

Arguments

This function takes no arguments.

Returns

Vector3

stepHumanoid

Arguments

dt

Returns

This function returns nothing.

API

instance:isVec3(v)
instance:isCF(v)
instance:flat(v)
instance:copy(tbl)
instance:signals()
instance:props()
instance:controller()
instance:characterOf(h)
instance:ownerRoot(h)
instance:localOwner(h, game)
instance:shouldSimulate(h, game)
instance:canSim(h)
instance:stanceOffset(h)
instance:shouldLogHumanoidRoot(root, interval)
instance:speedMul(h)
instance:markRigPart(part, isRoot)
instance:partFor(name, parent, spec, isRoot, createInstance)
instance:buildRig(parent, bindings, createInstance)
instance:encodeRigDescriptor(descriptor)
instance:decodeRigDescriptor(rawDescriptor)
instance:exportRigDescriptor(root, bindings)
instance:defaultRig(options)
instance:inferRigDescriptorFromCharacter(char, root)
instance:syncRoot(h)
instance:segPose(pose, name, i)
instance:poseOffset(h, bindingName, segName, i)
instance:applyPose(h, rootCF, pose)
instance:setState(h, c, nextState)
instance:updateStance(h)
instance:isSeated(h)
instance:reportSpeed(h, c, speed)
instance:restoreRigFromDescriptor(h, c)
instance:humanoidDefaultPose(animator, humanoid, context)
instance:configureAnimator(animator, autoEnableDefaults)
instance:getAnimator(h, createIfMissing, createInstance)
instance:getAssociatedPlayer(humanoid)
instance:getRegistry()
instance:createObject(className)
instance:bind(def)
instance:BindRig(def: any): Model?
instance:BuildRig(def: any): Model?
instance:CreateDefaultRig(options: table): Model?
instance:RestoreRig(): boolean
instance:GetRigPart(name: string): any
instance:GetRigChain(name: string): { any }?
instance:GetRigBindings(): table
instance:SetAnimator(animatorOrProvider: any): any
instance:SetPoseOffset(name: string, offset: CFrame)
instance:ClearPoseOffset(name: string)
instance:SetSpeedModifier(key: any, mult: number)
instance:RemoveSpeedModifier(key: any)
instance:SetIKCallback(source: any, callback: function)
instance:GetEffectiveWalkSpeed(): number
instance:SetSprinting(on: boolean)
instance:SetCrouching(on: boolean)
instance:ToggleCrouch()
instance:EquipTool(tool: any)
instance:UnequipTools()
instance:AddAccessory(accessory: any)
instance:RemoveAccessory(accessory: any)
instance:GetAccessories(): { any }
instance:Move(dir: Vector3)
instance:MoveRelative(localDir: Vector3, ref: any)
instance:Face(dir: Vector3)
instance:ClearFacingDirection()
instance:Stop()
instance:RequestJump()
instance:CanDash(): boolean
instance:Dash(dir: Vector3?): boolean
instance:GetState(): Enum.HumanoidStateType
instance:GetRootCFrame(): CFrame
instance:GetLookVector(): Vector3
instance:GetFocusPosition(): Vector3
instance:stepHumanoid(dt)

On this page