Class
Seat
A type of BasePart that characters can 'sit' in. When a character
touches an enabled Seat object, it will be attached to the part by a
Weld and the default character scripts will play a sitting animation.
A type of BasePart that a player character can 'sit' in. When a
character touches an enabled Seat object, it will be attached to the part by a
Weld and the default character scripts will play a sitting animation.
How do Seats work?#
When a model containing a Humanoid and a BasePart called
'HumanoidRootPart' (generally a player character) touches a seat, a
Weld is created between the seat and the part. The
C0 and C1 properties are
configured so that the character is welded 2 studs above the seat. This weld
is named 'SeatWeld' and parented to the seat.
When sitting the Seat.Occupant property is set to the Humanoid
that is 'sitting' in the seat. Furthermore the Humanoid.SeatPart
property of the humanoid is set to the seat.
A character can also be forced to sit in a seat using the Seat:Sit()
function.
There are two ways for a character to get out of a seat. When a player jumps, they are removed from the seat. However this can also be done manually by destroying the seat weld, for example:
seat:FindFirstChild("SeatWeld"):Destroy()
Note seats have a cooldown (currently 3 seconds) that is on a per-character per-seat basis. This means once a character has gotten out of a seat they cannot sit back on the same seat for 3 seconds. This cooldown behavior may change and should not be relied upon by developers.
What can Seats be used for?#
Seats have a diverse range of uses, ranging from the obvious to the more unconventional.
- Creating chairs or benches without the need for any programming
- Allowing characters to 'sit' in moving objects such as vehicles without getting flung around
- Creating interfaces that are controlled by the character in the seat using
the
Seat.Occupantproperty
Properties 2#
Methods 1#
Inherited members#
Inherited from FormFactorPart 2
Properties (2)
Inherited from BasePart 106
Properties (69)
Anchored, AssemblyAngularVelocity, AssemblyCenterOfMass, AssemblyLinearVelocity, AssemblyMass, AssemblyRootPart, AudioCanCollide, BackParamA, BackParamB, BackSurface, BackSurfaceInput, BottomParamA, BottomParamB, BottomSurface, BottomSurfaceInput, BrickColor, brickColor, CanCollide, CanQuery, CanTouch, CastShadow, CenterOfMass, CFrame, CollisionGroup, CollisionGroupId, Color, CurrentPhysicalProperties, CustomPhysicalProperties, Elasticity, EnableFluidForces, ExtentsCFrame, ExtentsSize, Friction, FrontParamA, FrontParamB, FrontSurface, FrontSurfaceInput, LeftParamA, LeftParamB, LeftSurface, LeftSurfaceInput, LocalTransparencyModifier, Locked, Mass, Massless, Material, MaterialVariant, Orientation, PivotOffset, Position, ReceiveAge, Reflectance, ResizeableFaces, ResizeIncrement, RightParamA, RightParamB, RightSurface, RightSurfaceInput, RootPriority, Rotation, RotVelocity, Size, SpecificGravity, TopParamA, TopParamB, TopSurface, TopSurfaceInput, Transparency, Velocity
Methods (32)
AngularAccelerationToTorque, ApplyAngularImpulse, ApplyImpulse, ApplyImpulseAtPosition, BindToCollisionSummaries, BreakJoints, breakJoints, CanCollideWith, CanSetNetworkOwnership, GetClosestPointOnSurface, GetConnectedParts, GetJoints, GetMass, getMass, GetNetworkOwner, GetNetworkOwnershipAuto, GetNoCollisionConstraints, GetRenderCFrame, GetRootPart, GetTouchingParts, GetVelocityAtPosition, IntersectAsync, IsGrounded, MakeJoints, makeJoints, Resize, resize, SetNetworkOwner, SetNetworkOwnershipAuto, SubtractAsync, TorqueToAngularAcceleration, UnionAsync
Events (5)
LocalSimulationTouched, OutfitChanged, StoppedTouching, Touched, TouchEnded
Inherited from Instance 58
Properties (10)
Archivable, archivable, Capabilities, IsInSandbox, Name, Parent, PredictionMode, RobloxLocked, Sandboxed, UniqueId
Methods (39)
AddTag, children, ClearAllChildren, Clone, clone, Destroy, destroy, FindFirstAncestor, FindFirstAncestorOfClass, FindFirstAncestorWhichIsA, FindFirstChild, findFirstChild, FindFirstChildOfClass, FindFirstChildWhichIsA, FindFirstDescendant, GetActor, GetAttribute, GetAttributeChangedSignal, GetAttributes, GetChildren, getChildren, GetDebugId, GetDescendants, GetFullName, GetStyled, GetStyledPropertyChangedSignal, GetTags, HasTag, IsAncestorOf, IsDescendantOf, isDescendantOf, IsPropertyModified, QueryDescendants, Remove, remove, RemoveTag, ResetPropertyToDefault, SetAttribute, WaitForChild