VehicleSeat
The VehicleSeat objects welds a player to the seat when the player touches the seat. It then forwards the movement keys to any connected motor joints, allowing control of a vehicle.
While VehicleSeats are 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.
Summary
Properties
- read onlynot replicatedread parallel
Displays how many hinges are detected by the VehicleSeat. Useful for debugging vehicle designs.
Toggles whether the VehicleSeat is active or not.
- read parallel
If true, a fancy speed bar will be displayed speed on screen that tells you what speed the Vehicle is moving at.
The maximum speed that can be attained.
The humanoid that is sitting in the seat.
The direction of movement, tied to the keys A and D. Must be one of 1 (right), 0 (straight), or -1 (left). Will refresh back to 0 unless constantly set.
- read parallel
Functions identically to VehicleSeat.Steer, but the value is not an integer.
The direction of movement, tied to the keys W and S. Must be an integer 1 (forward) 0 (null) or -1 (reverse). Will refresh back to 0 unless constantly set.
- read parallel
Functions identically to VehicleSeat.Throttle, but the value is not an integer.
How fast the vehicles will be able to attain VehicleSeat.MaxSpeed. The greater the number, the faster it will reach the maximum speed.
The speed at which the vehicle will turn. Higher numbers can cause problems and are not necessarily better.
Determines whether a part is immovable by physics.
- not replicatedread parallel
The angular velocity of the part's assembly.
- read onlynot replicatedread parallel
The center of mass of the part's assembly in world space.
- not replicatedread parallel
The linear velocity of the part's assembly.
- read onlynot replicatedread parallel
The total mass of the part's assembly.
- read onlynot replicatedread parallel
A reference to the root part of the assembly.
- read parallel
Determines the type of surface for the Back face of a part (+Z direction).
- read parallel
Determines the type of surface for the Bottom face of a part (-Y direction).
- not replicatedread parallel
Determines the color of a part.
Determines the position and orientation of the BasePart in the world.
- read parallel
Determines whether a part may collide with other parts.
Determines whether the part is considered during spatial query operations.
Determines if Touched and TouchEnded events fire on the part.
- read parallel
Determines whether or not a part casts a shadow.
- read onlynot replicatedread parallel
Describes the world position in which a part's center of mass is located.
- not replicatedread parallel
Describes the name of a part's collision group.
Determines the color of a part.
- read onlynot replicatedread parallel
Indicates the current physical properties of the part.
- read parallel
Determines several physical properties of a part.
- read parallel
Used to enable or disable aerodynamic forces on parts and assemblies.
- read onlynot replicatedread parallel
- read onlynot replicatedread parallel
The actual physical size of the BasePart as regarded by the physics engine.
- read parallel
Determines the type of surface for the Front face of a part (-Z direction).
- read parallel
Determines the type of surface for the Left face of a part (-X direction).
- hiddennot replicatedread parallel
Determines a multiplier for BasePart.Transparency that is only visible to the local client.
Determines whether a part is selectable in Studio.
Describes the mass of the part, the product of its density and volume.
Determines whether the part contributes to the total mass or inertia of its rigid body.
- read parallel
Determines the texture and default physical properties of a part.
- not replicatedread parallel
The name of MaterialVariant.
- hiddennot replicatedread parallel
Describes the rotation of the part in the world.
- read parallel
Specifies the offset of the part's pivot from its CFrame.
Describes the position of the part in the world.
- hiddenread onlynot replicatedread parallel
Time since last recorded physics update.
- read parallel
Determines how much a part reflects the skybox.
- read onlynot replicatedread parallel
Describes the smallest change in size allowable by the Resize method.
- read onlynot replicatedread parallel
Describes the faces on which a part may be resized.
- read parallel
Determines the type of surface for the Right face of a part (+X direction).
- read parallel
The main rule in determining the root part of an assembly.
The rotation of the part in degrees for the three axes.
Determines the dimensions of a part (length, width, height).
- read parallel
Determines the type of surface for the Top face of a part (+Y direction).
- read parallel
Determines how much a part can be seen through (the inverse of part opacity).
- not replicatednot scriptableread parallel
Methods
Forces the character with the specified Humanoid to sit in the VehicleSeat.
Apply an angular impulse to the assembly.
Apply an impulse to the assembly at the assembly's center of mass.
Apply an impulse to the assembly at specified position.
- write parallel
Returns whether the parts can collide with each other.
Checks whether you can set a part's network ownership.
- write parallel
Returns a table of parts connected to the object by any kind of rigid joint.
Return all Joints or Constraints that is connected to this Part.
Returns the value of the Mass property.
- write parallel
Returns the current player who is the network owner of this part, or nil in case of the server.
- write parallel
Returns true if the game engine automatically decides the network owner for this part.
- write parallel
Returns the base part of an assembly of parts.
Returns a table of all BasePart.CanCollide true parts that intersect with this part.
- write parallel
Returns the linear velocity of the part's assembly at the given position relative to this part.
- write parallel
Returns true if the object is connected to a part that will hold it in place (eg an BasePart.Anchored part), otherwise returns false.
Changes the size of an object just like using the Studio resize tool.
Sets the given player as network owner for this and all connected parts.
Lets the game engine dynamically decide who will handle the part's physics (one of the clients or the server).
- IntersectAsync(parts: Objects,collisionfidelity: Enum.CollisionFidelity,renderFidelity: Enum.RenderFidelity):Instanceyields
Creates a new IntersectOperation from the overlapping geometry of the part and the other parts in the given array.
- SubtractAsync(parts: Objects,collisionfidelity: Enum.CollisionFidelity,renderFidelity: Enum.RenderFidelity):Instanceyields
Creates a new UnionOperation from the part, minus the geometry occupied by the parts in the given array.
- UnionAsync(parts: Objects,collisionfidelity: Enum.CollisionFidelity,renderFidelity: Enum.RenderFidelity):Instanceyields
Creates a new UnionOperation from the part, plus the geometry occupied by the parts in the given array.
Gets the pivot of a PVInstance.
Transforms the PVInstance along with all of its descendant PVInstances such that the pivot is now located at the specified CFrame.
Events
Events inherited from BasePartFires when a part stops touching another part as a result of physical movement.
Fires when a part touches another part as a result of physical movement.
Properties
AreHingesDetected
Displays how many hinges are detected by the VehicleSeat. Useful for debugging vehicle designs.
Disabled
Toggles whether the VehicleSeat is active or not. If the seat is disabled then it will not automatically weld a character to it on collision and will not allow a character to control the connected vehicle.
HeadsUpDisplay
If true, a fancy speed bar will be displayed speed on screen that tells you what speed the Vehicle is moving at.
Steer
The direction of movement, tied to the keys A and D. Must be one of 1 (right), 0 (straight), or -1 (left). Will refresh back to 0 unless constantly set.
Throttle
The direction of movement, tied to the keys W and S. Must be an integer 1 (forward) 0 (null) or -1 (reverse). Will refresh back to 0 unless constantly set.
ThrottleFloat
Functions identically to VehicleSeat.Throttle, but the value is not an integer.
Torque
How fast the vehicles will be able to attain VehicleSeat.MaxSpeed. The greater the number, the faster it will reach the maximum speed.
TurnSpeed
The speed at which the vehicle will turn. Higher numbers can cause problems and are not necessarily better.