Roblox UtilitiesDevlHub Roblox Documentation

Class

VehicleSeat

Inherits
BasePart › PVInstance › Instance › Object
Memory category
Instances

A seat object that can be used to control a vehicle.

The VehicleSeat objects welds a player to the seat when the player touches the seat. It then forwards the movement inputs to any connected motor joints, allowing control of a vehicle.

While VehicleSeat is great for making simple vehicles they do have some limitations. Movement control will only detect motors connected directly to the vehicle seat, or through another rigid connection. This means that if you have a wheel connected to a beam which is then welded to the seat it will work fine, however if you have the wheel connected to a part, which is connected by a hinge to the rest of the car, it will not work.

Properties 11#

AreHingesDetectedintDisplays how many hinges are detected by the VehicleSeat. Useful for debugging vehicle designs.ReadSafeReadOnlyNotReplicated
DisabledbooleanToggles whether the VehicleSeat is active or not.ReadSafe
HeadsUpDisplaybooleanIf true, a UI speed bar will be displayed on screen that tells you what speed the vehicle is moving at.ReadSafe
MaxSpeedfloatThe maximum speed that can be attained.ReadSafe
OccupantHumanoidThe Humanoid that is sitting in the seat.ReadSafeReadOnlyNotReplicated
SteerintThe direction of movement, tied to left and right movement inputs.ReadSafeDeprecatedNotReplicated
SteerFloatfloatThe left-to-right movement float, tied to left and right movement inputs.ReadSafe
ThrottleintThe direction of throttle, tied to forward and backward movement inputs.ReadSafeDeprecatedNotReplicated
ThrottleFloatfloatThe forward-to-reverse throttle float, tied to forward and backward movement inputs.ReadSafe
TorquefloatHow fast the vehicle will be able to attain MaxSpeed.ReadSafe
TurnSpeedfloatThe speed at which the vehicle will turn. Higher numbers can cause problems and are not necessarily better.ReadSafe

AreHingesDetected: int#

ReadOnlyNotReplicatedReadSafe

Displays how many hinges are detected by the VehicleSeat. Useful for debugging vehicle designs.

Disabled: boolean#

ReadSafe

Toggles whether the VehicleSeat is active or not. If the seat is disabled, it will not automatically weld a character to it on collision and will not allow a character to control the connected vehicle.

HeadsUpDisplay: boolean#

ReadSafe

If true, a UI speed bar will be displayed on screen that tells you what speed the vehicle is moving at.

MaxSpeed: float#

ReadSafe

The maximum speed that can be attained.

Occupant: Humanoid#

ReadOnlyNotReplicatedReadSafe

The Humanoid that is sitting in the seat.

Steer: int#

NotReplicatedReadSafeDeprecated

Deprecated. This property is no longer replicated and has been deprecated in favor of SteerFloat which is a float variant and should be used instead.

The direction of movement, tied to left and right movement inputs. Can be either 1 (right), 0 (straight), or -1 (left). Will refresh back to 0 unless constantly set.

SteerFloat: float#

ReadSafe

The left-to-right movement float, tied to left and right movement inputs. Can range between 1 (right) and -1 (left). Will refresh back to 0 (straight) unless constantly set.

Throttle: int#

NotReplicatedReadSafeDeprecated

Deprecated. This property is not longer replicated and has been deprecated in favor of ThrottleFloat which is a float variant and should be used instead.

The direction of throttle, tied to forward and backward movement inputs. Can be either 1 (forward), 0 (null), or -1 (reverse). Will refresh back to 0 unless constantly set.

ThrottleFloat: float#

ReadSafe

The forward-to-reverse throttle float, tied to forward and backward movement inputs. Can range between 1 (forward) and -1 (reverse). Will refresh back to 0 (null) unless constantly set.

Torque: float#

ReadSafe

How fast the vehicle will be able to attain MaxSpeed. The greater the number, the faster it will reach the maximum speed.

TurnSpeed: float#

ReadSafe

The speed at which the vehicle will turn. Higher numbers can cause problems and are not necessarily better.

Methods 1#

SitForces the character with the specified Humanoid to sit in the VehicleSeat.

Sit(humanoid: Instance): ()#

Forces the character with the specified Humanoid to sit in the VehicleSeat.

NameTypeDefaultDescription
humanoidInstanceThe Humanoid being forced to sit in the VehicleSeat.
Returns
  • ()

Inherited members#

Inherited from BasePart 106
Inherited from PVInstance 4
Properties (2)

Origin, Pivot Offset

Methods (2)

GetPivot, PivotTo

Inherited from Instance 58
Inherited from Object 6
Properties (2)

ClassName, className

Events (1)

Changed