VehicleSeat
A seat object that can be used to control a vehicle.
| Memory category | Instances |
|---|
Member index 14
Description
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.
History 53
- 577 Change Tags of Throttle from [] to [NotReplicated]
- 577 Change Tags of Steer from [] to [NotReplicated]
- 573 Change ReturnType of Sit from void to null
- 553 Add
- 553 Add
- 553 Change Default of TurnSpeed from to 1
- 553 Change Default of Torque from to 10
- 553 Change Default of ThrottleFloat from to 0
- 553 Change Default of Throttle from to 0
- 553 Change Default of SteerFloat from to 0
- 553 Change Default of Steer from to 0
- 553 Change Default of Occupant from to
- 553 Change Default of MaxSpeed from to 25
- 553 Change Default of HeadsUpDisplay from to true
- 553 Change Default of Disabled from to false
- 553 Change Default of AreHingesDetected from to 0
- 486 Change ThreadSafety of TurnSpeed from ReadOnly to ReadSafe
- 486 Change ThreadSafety of Torque from ReadOnly to ReadSafe
- 486 Change ThreadSafety of ThrottleFloat from ReadOnly to ReadSafe
- 486 Change ThreadSafety of Throttle from ReadOnly to ReadSafe
- 486 Change ThreadSafety of SteerFloat from ReadOnly to ReadSafe
- 486 Change ThreadSafety of Steer from ReadOnly to ReadSafe
- 486 Change ThreadSafety of Occupant from ReadOnly to ReadSafe
- 486 Change ThreadSafety of MaxSpeed from ReadOnly to ReadSafe
- 486 Change ThreadSafety of HeadsUpDisplay from ReadOnly to ReadSafe
- 486 Change ThreadSafety of Disabled from ReadOnly to ReadSafe
- 486 Change ThreadSafety of AreHingesDetected from ReadOnly to ReadSafe
- 462 Change ThreadSafety of Sit from to Unsafe
- 462 Change ThreadSafety of TurnSpeed from to ReadOnly
- 462 Change ThreadSafety of Torque from to ReadOnly
- 462 Change ThreadSafety of ThrottleFloat from to ReadOnly
- 462 Change ThreadSafety of Throttle from to ReadOnly
- 462 Change ThreadSafety of SteerFloat from to ReadOnly
- 462 Change ThreadSafety of Steer from to ReadOnly
- 462 Change ThreadSafety of Occupant from to ReadOnly
- 462 Change ThreadSafety of MaxSpeed from to ReadOnly
- 462 Change ThreadSafety of HeadsUpDisplay from to ReadOnly
- 462 Change ThreadSafety of Disabled from to ReadOnly
- 462 Change ThreadSafety of AreHingesDetected from to ReadOnly
- 329 Change ValueType of Occupant from Object to Humanoid
- 307 Add Sit
- 284 Add ThrottleFloat
- 284 Add SteerFloat
- 196 Add Occupant
- 47 Add TurnSpeed
- 47 Add Torque
- 47 Add Throttle
- 47 Add Steer
- 47 Add MaxSpeed
- 47 Add HeadsUpDisplay
- 47 Add Disabled
- 47 Add AreHingesDetected
- 47 Add VehicleSeat
Members 14
AreHingesDetected
| Type | Default | |
|---|---|---|
| int | 0 | |
Displays how many hinges are detected by the VehicleSeat. Useful for
debugging vehicle designs.
| Thread safety | ReadSafe |
|---|---|
| Category | Control |
| Loaded/Saved | false |
History 4
- 553 Change Default of AreHingesDetected from to 0
- 486 Change ThreadSafety of AreHingesDetected from ReadOnly to ReadSafe
- 462 Change ThreadSafety of AreHingesDetected from to ReadOnly
- 47 Add AreHingesDetected
Disabled
| Type | Default | |
|---|---|---|
| bool | false | |
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.
| Thread safety | ReadSafe |
|---|---|
| Category | Control |
| Loaded/Saved | true |
HeadsUpDisplay
| Type | Default | |
|---|---|---|
| bool | true | |
If true, a UI speed bar will be displayed on screen that tells you what
speed the vehicle is moving at.
| Thread safety | ReadSafe |
|---|---|
| Category | Control |
| Loaded/Saved | true |
History 4
- 553 Change Default of HeadsUpDisplay from to true
- 486 Change ThreadSafety of HeadsUpDisplay from ReadOnly to ReadSafe
- 462 Change ThreadSafety of HeadsUpDisplay from to ReadOnly
- 47 Add HeadsUpDisplay
MaxSpeed
| Type | Default | |
|---|---|---|
| float | 25 | |
The maximum speed that can be attained.
| Thread safety | ReadSafe |
|---|---|
| Category | Control |
| Loaded/Saved | true |
Occupant
| Type | Default | |
|---|---|---|
| Humanoid | ||
The Humanoid that is sitting in the seat.
| Thread safety | ReadSafe |
|---|---|
| Category | Control |
| Loaded/Saved | false |
Sit
| Parameters (1) | ||
|---|---|---|
| humanoid | Instance | |
| Returns (1) | ||
| null | ||
Forces the character with the specified Humanoid to sit in the
VehicleSeat.
| Thread safety | Unsafe |
|---|
Steer
| Type | Default | |
|---|---|---|
| int | 0 | |
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.
| Thread safety | ReadSafe |
|---|---|
| Category | Control |
| Loaded/Saved | true |
SteerFloat
| Type | Default | |
|---|---|---|
| float | 0 | |
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.
| Thread safety | ReadSafe |
|---|---|
| Category | Control |
| Loaded/Saved | true |
History 4
- 553 Change Default of SteerFloat from to 0
- 486 Change ThreadSafety of SteerFloat from ReadOnly to ReadSafe
- 462 Change ThreadSafety of SteerFloat from to ReadOnly
- 284 Add SteerFloat
Throttle
| Type | Default | |
|---|---|---|
| int | 0 | |
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.
| Thread safety | ReadSafe |
|---|---|
| Category | Control |
| Loaded/Saved | true |
ThrottleFloat
| Type | Default | |
|---|---|---|
| float | 0 | |
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.
| Thread safety | ReadSafe |
|---|---|
| Category | Control |
| Loaded/Saved | true |
History 4
- 553 Change Default of ThrottleFloat from to 0
- 486 Change ThreadSafety of ThrottleFloat from ReadOnly to ReadSafe
- 462 Change ThreadSafety of ThrottleFloat from to ReadOnly
- 284 Add ThrottleFloat
Torque
| Type | Default | |
|---|---|---|
| float | 10 | |
How fast the vehicle will be able to attain MaxSpeed. The greater the number, the faster it will reach the maximum speed.
| Thread safety | ReadSafe |
|---|---|
| Category | Control |
| Loaded/Saved | true |
TurnSpeed
| Type | Default | |
|---|---|---|
| float | 1 | |
The speed at which the vehicle will turn. Higher numbers can cause problems and are not necessarily better.
| Thread safety | ReadSafe |
|---|---|
| Category | Control |
| Loaded/Saved | true |