Skip to main content

VehicleSeat

Allows players to control vehicles by rotating when sat on. It is incredibly important to have when creating vehicles.

Attaching buttons to the vehicleseat will allow the player sitting on it to trigger the button by pressing a key. Simply attach the button to the vehicle seat, configure it to the keybind you would like, and it will allow you to trigger that button by pressing the key when sitting down in the seat.

It is a craftable and spawnable non-flammable solid.

Here is a list of possible sizes that reach the maximum malleability (9) that have integer components: 1x9x1, 1x3x3

At its default size (2x1x2) it has a durability of 4, at its maximum size it has a durability of 6.

By default, its colour is #0000ff.

It requires 2 Rubber and 3 Wood to be crafted.

Methods


EjectOccupant()

Ejects the seat occupant.


GetOccupant() → currentOccupant

Retrieves the UserId of the seat's occupant, it will be nil if there is no occupant.

The currentOccupant return is a number. It can also be nil.

Configurables


Enabled

Determines whether this seat should control its rotation. Turning this off results in a regular seat. It is a boolean.


Mode

The control mode of the seat. Horizontal: Rotate horizontally with A/D. Full: Rotate horizontally and vertically with W/A/S/D. Mouse: point towards the player's mouse when holding click. It is a VehicleSeatMode.


Speed

The speed at which the seat will rotate. It is a number. It ranges between 0 and 10.

Events


Configured(configurerId)

Fires when the object is configured.

The configurerId parameter is the UserId of the player who configured the object. It is a number.


OccupantChanged