Skip to content

Class · inherits ControllerSensor

ControllerPartSensor

Official docs ↗

A SensorBase that outputs data about another BasePart based on Humanoid floor and ladder detection logic.

About ControllerPartSensor

A SensorBase that outputs data about another BasePart based on Humanoid floor and ladder detection logic. It is primarily used for sending data to a character controller. Using a ControllerPartSensor allows you to detect BaseParts in the same manner as the Humanoid uses for detecting floors and ladders.

Properties 8

  • HitFrame: CFrameThe position in world space where the sensor hit the ControllerPartSensor.SensedPart.
  • HitNormal: Vector3The surface normal at the position where the sensor hit the ControllerPartSensor.SensedPart.

    The surface normal at the position where the sensor hit the SensedPart.

  • LadderSearchHeight: floatThe upper bound, in studs, of the vertical region the sensor searches for a ladder when ControllerPartSensor.SensorMode is set to a ladder mode.

    Top of the vertical extent the sensor scans for a climbable ladder, in studs relative to the sensor's parent BasePart. Together with ControllerPartSensor.LadderSearchOffset, it defines the height range: the region extends upward to LadderSearchHeight minus LadderSearchOffset.

    Defaults to 6; clamped to non-negative values.

    Only affects sensing when ControllerPartSensor.SensorMode is a ladder mode such as SensorMode.Ladder. Because SensorMode defaults to SensorMode.Floor, this has no effect until SensorMode is changed.

  • LadderSearchOffset: floatThe downward offset, in studs, that positions the vertical region the sensor searches for a ladder when ControllerPartSensor.SensorMode is set to a ladder mode.

    Downward offset, in studs relative to the parent BasePart, that positions the vertical extent scanned for a climbable ladder. Behaves like a hip-height offset: increasing it lowers both the bottom and top of the searched region, and scales the rung-spacing tolerance used to decide whether a surface is climbable.

    Defaults to 5; clamped to non-negative values.

    Only affects sensing when ControllerPartSensor.SensorMode is a ladder mode such as SensorMode.Ladder. Because SensorMode defaults to SensorMode.Floor, this has no effect until SensorMode is changed.

  • SearchDistance: floatThe distance from the sensor's parent BasePart to use when sensing other parts.
  • SensedMaterial: MaterialThe surface Material of the ControllerPartSensor.SensedPart that the sensor is currently detecting.

    Surface Material of the part the sensor currently detects, matching the material Humanoid floor and ladder detection report for the same contact. Updated as an output alongside ControllerPartSensor.SensedPart, ControllerPartSensor.HitFrame, and ControllerPartSensor.HitNormal each time the sensor senses.

    Defaults to Material.Air.

  • SensedPart: BasePartA reference to the BasePart hit by the sensor.
  • SensorMode: SensorModeDetermines what behavior this SensorBase uses when sensing other parts.

    Determines what behavior this SensorBase uses when sensing other parts.

    A setting of SensorMode.Ladder performs the same ladder detection logic used by a Humanoid to populate sensor output. It currently always senses along the forward vector of its parent BasePart.

    A setting of SensorMode.Floor performs the same floor detection logic used by a Humanoid to populate sensor output. It currently always senses along the negative up vector of the world.

ControllerPartSensor also has every member of ControllerSensor. Deprecated and Roblox-only members are hidden.

Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com · Studio 0.743.0.7431133.