CharacterController
Inherits: Model
CharacterController is a special type of Model that provides standard platformer movement mechanics.
A CharacterController is automatically created for each Player in the game. When a player's CharacterController dies, a new one is automatically created at an active respawn location.
Properties
Whether the character can fly. If true, the character can move freely in 3D space without being affected by gravity.
The speed multiplier applied to movement while flying. This allows flying movement to be faster or slower than normal movement.
The jump force of the character, measured as the initial upward velocity when jumping, in studs per second.
The maximum jump height the character can reach, in studs.
Whether the player's character appearance should be loaded when spawning.
The maximum slope angle the character can walk up, in degrees.
The movement speed of the character, in studs per second.
The current movement velocity of the character.
Whether the character can roll while in the tripping state.
The running speed of the character, in studs per second.
The current state of the character controller.
The maximum height moving up steps without needing to jump, in studs.
The tilt angle (in degrees) used for TiltBased tripping.
Determines how the character can automatically enter the tripping state.
Whether this character should read player input (local authority only).
Functions
Forces non-player controlled characters to use running speed while moving.
Makes the character sit on the ground. Unlike Seated, the character is not anchored to any object and has the same free physics behavior as Tripping — they can be pushed around. The player can stand back up by pressing Jump or by calling StandUp.
Stands the character back up from CharacterControllerState.Sitting. Has no effect in other states.
Forces non-player controlled characters to use walking speed while moving.
Signals
Event fired when the character receives damage
Event fired when the character dies.
Event fired when a MoveTo request completes.
Event fired when a PathTo request cannot find a valid path.
Event fired when a PathTo request reaches its destination.
Event fired when a PathTo request finishes (true if reached, false if blocked).
Properties
Functions
Welds all touching parts within the model together, allowing them to move as a single unit.
Welds every physics part within the model directly to the model's primary body. Unlike MakeJoints, this does not require parts to be touching — every part gets a weld straight to the primary body regardless of proximity.
Removes all welds connected to any physics instance within this model.
Properties
The transparency of the VisualInstance.
Whether the VisualInstance is visible in the game world.
Properties
Whether this Instance or any of its descendants should be included when saving or copying via Clone()
The unique identifier for this Instance.
The name of this Instance.
The parent of this Instance in the hierarchy.
The sort index of this Instance among its siblings. If this Instance has no parent, this value is ignored.
Functions
Re-attaches an existing component ref (used by detach-undo to preserve identity).
Creates a deep clone of this Instance and all its descendants.
Removes this Instance, and all its descendants, from the DataModel, and locks its parent property.
Schedules this Instance to be destroyed after the specified delay in seconds. This function will error if called multiple times.
Detaches a specific component by reference. Use this to remove a broken component, which has no live file to identify it by.
Returns an array of the children of this Instance.
Returns the path of the script component at , or an empty string if the script file no longer exists.
Determines if this Instance is a descendant of the specified ancestor Instance.