PcoWSkbVqDnWTu_dm2ix
Collapse Sidebar

Seated

This event fires when a Humanoid either sits in or gets up from a Seat or VehicleSeat.

When a character comes into contact with a seat, they are attached to the seat and a sitting animation plays. For more information on this, see the Seat page.

  • If the character is sitting down, the active parameter will be true and currentSeatPart will be the seat they are currently sitting in.
  • If the character got up from a seat, the active parameter will be false and currentSeatPart will be nil.

See also

  • Humanoid/Sit, which indicates if a Humanoid is currently sitting
  • Humanoid/SeatPart, which indicates the seat a Humanoid is currently sitting in, if any.

Parameters

Name Type Default Description

True if the Humanoid is sitting down

The seat the Humanoid is sat in if it is sitting down


Code Samples


Finding a Player's Seat

This code sample demonstrates when the Players/LocalPlayer|LocalPlayer's Player/Character|Character sits down or stands up.

It should be placed inside a LocalScript within StarterCharacterScripts|StarterPlayer.StarterCharacterScripts. When the player’s character spawns in, it will cause a copy of the LocalScript to be placed into their character. This runs the code on that player’s client.