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.

概要

プロパティ

  • 読み取り専用
    複製されていません
    並列読み取り

    Displays how many hinges are detected by the VehicleSeat. Useful for debugging vehicle designs.

  • 並列読み取り

    Toggles whether the VehicleSeat is active or not.

  • 並列読み取り

    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.

  • 並列読み取り

    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.

  • 並列読み取り

    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.

BasePart から継承した プロパティ
  • 並列読み取り

    Determines whether a part is immovable by physics.

  • 複製されていません
    並列読み取り

    The angular velocity of the part's assembly.

  • 読み取り専用
    複製されていません
    並列読み取り

    The center of mass of the part's assembly in world space.

  • 複製されていません
    並列読み取り

    The linear velocity of the part's assembly.

  • 読み取り専用
    複製されていません
    並列読み取り

    The total mass of the part's assembly.

  • 読み取り専用
    複製されていません
    並列読み取り

    A reference to the root part of the assembly.

  • 並列読み取り

    Determines the type of surface for the Back face of a part (+Z direction).

  • Determines the type of surface for the Bottom face of a part (-Y direction).

  • 複製されていません
    並列読み取り

    Determines the color of a part.

  • 並列読み取り

    Determines the position and orientation of the BasePart in the world.

  • 並列読み取り

    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.

  • 並列読み取り

    Determines whether or not a part casts a shadow.

  • 読み取り専用
    複製されていません
    並列読み取り

    Describes the world position in which a part's center of mass is located.

  • 複製されていません
    並列読み取り

    Describes the name of a part's collision group.

  • 複製されていません
    並列読み取り

    Determines the color of a part.

  • 読み取り専用
    複製されていません
    並列読み取り

    Indicates the current physical properties of the part.

  • Determines several physical properties of a part.

  • 並列読み取り

    Used to enable or disable aerodynamic forces on parts and assemblies.

  • 読み取り専用
    複製されていません
    並列読み取り

    The CFrame of the physical extents of the BasePart.

  • 読み取り専用
    複製されていません
    並列読み取り

    The actual physical size of the BasePart as regarded by the physics engine.

  • 並列読み取り

    Determines the type of surface for the Front face of a part (-Z direction).

  • 並列読み取り

    Determines the type of surface for the Left face of a part (-X direction).

  • 非表示
    複製されていません
    並列読み取り

    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.

  • 並列読み取り

    Determines the texture and default physical properties of a part.

  • 複製されていません
    並列読み取り

    The name of MaterialVariant.

  • 非表示
    複製されていません
    並列読み取り

    Describes the rotation of the part in the world.

  • 並列読み取り

    Specifies the offset of the part's pivot from its CFrame.

  • 非表示
    複製されていません
    並列読み取り

    Describes the position of the part in the world.

  • 非表示
    読み取り専用
    複製されていません
    並列読み取り

    Time since last recorded physics update.

  • 並列読み取り

    Determines how much a part reflects the skybox.

  • 読み取り専用
    複製されていません
    並列読み取り

    Describes the smallest change in size allowable by the Resize method.

  • 読み取り専用
    複製されていません
    並列読み取り

    Describes the faces on which a part may be resized.

  • 並列読み取り

    Determines the type of surface for the Right face of a part (+X direction).

  • 並列読み取り

    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).

  • 並列読み取り

    Determines the type of surface for the Top face of a part (+Y direction).

  • 並列読み取り

    Determines how much a part can be seen through (the inverse of part opacity).

PVInstance から継承した プロパティ
  • 複製されていません
    スクリプト作成できません
    並列読み取り
  • 複製されていません
    スクリプト作成できません
    並列読み取り

方法

  • Sit(humanoid : Instance):void

    Forces the character with the specified Humanoid to sit in the VehicleSeat.

BasePart から継承した 方法PVInstance から継承した 方法

イベント

BasePart から継承した イベント

プロパティ

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.

MaxSpeed

並列読み取り

The maximum speed that can be attained.

Occupant

読み取り専用
複製されていません
並列読み取り

The humanoid that is sitting in the seat

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.

SteerFloat

並列読み取り

Functions identically to VehicleSeat.Steer, but the value is not an integer.

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.

方法

Sit

void

Forces the character with the specified Humanoid to sit in the VehicleSeat.

パラメータ

humanoid: Instance

The humanoid being forced to sit in the VehicleSeat.


戻り値

void

イベント