Roblox Wiki
Advertisement
Roblox Wiki

The BasePart class is a structural class that holds all the properties, methods and events common to part classes, such as Part, WedgePart, CornerWedgePart, TrussPart, SpawnLocation, Seat, VehicleSeat, SkateboardPlatform, and FlagStand. The most common is the simple part. While many of these classes extend the BasePart class directly, some extend the FormFactorPart class, which is itself a subclass of BasePart. The BasePart class cannot be instantiated.

Properties

This class has forty-seven properties.

Anchored: bool

Determines whether or not physics acts upon the Part. If true, part stays 'Anchored' in space, not moving regardless of any collision/forces acting upon it. If false, physics works normally on the part.

BrickColor: BrickColor

The color of a part is set by the value of its BrickColor property. Brick colors are a set of pre-defined colors that the user may choose from to color parts, teams and other things in the ROBLOX engine.

CFrame: CoordinateFrame

Contains information regarding the Part's position and a matrix that defines the Part's rotation. Can read/write.

CanCollide: bool

Determines whether physical interactions with other Parts are respected. If true, will collide and react with physics to other Parts. If false, other parts will pass thru instead of colliding

Color: Color3

Deprecated. Use BrickColor instead

CustomPhysicalProperties: PhysicalProperties

Elasticity: float

A float value ranging from 0.0f to 1.0f. Sets how much the Part will rebound against another. a value of 1 is like a superball, and 0 is like a lead block.

Friction: float

A float value ranging from 0.0f to 1.0f. Sets how much the Part will be able to slide. a value of 1 is no sliding, and 0 is no friction, so infinite sliding.

LocalTransparencyModifier: float

Locked: bool

Determines whether building tools (in-game and studio) can manipulate this Part. If true, no editing allowed. If false, editing is allowed.

Material: Material

Specifies the look and feel the Part should have. Note: this does not define the color the Part is, see BrickColor for that.

Position: Vector3

A part's position can be changed by modifying the value of this property.

ReceiveAge: float

Reflectance: float

Specifies how shiny the Part is. A value of 1 is completely reflective (chrome), while a value of 0 is no reflectance (concrete wall)

ResizeIncrement: int

Sets the value for the smallest change in size allowable by the Resize(NormalId, int) function.

ResizeableFaces: Faces

Sets the value for the faces allowed to be resized by the Resize(NormalId, int) function.

RotVelocity: Vector3

This property defines the rotational velocity of the part it belongs to.

Rotation: Vector3

Size: Vector3

This property defines the size of the part it belongs to.

SpecificGravity: float

This property defines many times more dense than ROBLOX's water the part it belongs to is. Its value depends on the part's material.

Transparency: float

Sets how visible an object is. A value of 1 makes the object invisible, while a value of 0 makes the object opaque.

Velocity: Vector3

How fast the Part is traveling in studs/second. This property is NOT recommended to be modified directly, unless there is good reason. Otherwise, try using a BodyForce to move a Part.

brickColor: BrickColor

This property is deprecated and the BrickColor property should be used instead.

Surface inputs

The surface input properties are used to specify an input for a specific surface.

BackSurfaceInput: InputType

BottomSurfaceInput: InputType

FrontSurfaceInput: InputType

LeftSurfaceInput: InputType

RightSurfaceInput: InputType

TopSurfaceInput: InputType

Surface types

The surface type properties can be used to change the appearance of a specific surface of a part. Surface types also change the behavior of parts with other parts they are sticking to.

BackSurface: SurfaceType

BottomSurface: SurfaceType

FrontSurface: SurfaceType

LeftSurface: SurfaceType

RightSurface: SurfaceType

TopSurface: SurfaceType

Surface parameters

The surface parameter properties are used to give parameters to certain surfaces of a part. These parameters are used, for example, by the motor part surface.

BackParamA: float

BackParamB: float

BottomParamA: float

BottomParamB: float

FrontParamA: float

FrontParamB: float

LeftParamA: float

LeftParamB: float

RightParamA: float

RightParamB: float

TopParamA: float

TopParamB: float

Methods

This class has eighteen methods.

BreakJoints(): void

Destroys SurfaceJoints with all parts that are touching this Instance (including internal joints in the Instance, as in a Model).

CanSetNetworkOwnership(): Tuple

GetConnectedParts(recursive: bool = false): Objects

GetMass(): float

Returns a number that is the mass of this Instance. Mass of a Part is immutable, and is changed only by the size of the Part.

GetNetworkOwner(): Instance

GetNetworkOwnershipAuto(): bool

GetRenderCFrame(): CoordinateFrame

GetRootPart(): Instance

GetTouchingParts(): Objects

IsGrounded(): bool

MakeJoints(): void

Creates the appropriate SurfaceJoints with all parts that are touching this Instance (including internal joints in the Instance, as in a Model). This uses the SurfaceTypes defined on the surfaces of parts to create the appropriate welds.

Resize(normalId: NormalId, deltaAmount: int): bool

Resizes a Part in the direction of the face defined by 'NormalId', by the amount specified by 'deltaAmount'. If the operation will expand the part to intersect another Instance, the part will not resize at all. Return true if the call is successful, false otherwise.

SetNetworkOwner(playerInstance: Instance = nil): void

SetNetworkOwnershipAuto(): void

breakJoints(): void

getMass(): float

Use GetMass instead.

makeJoints(): void

Use MakeJoints instead.

resize(normalId: NormalId, deltaAmount: int): bool

Events

This class has six events.

LocalSimulationTouched(part: Instance)

Deprecated. Use Touched instead.

OutfitChanged()

This event will be fired when one of the visual properties of the part it belongs to is changed.

StoppedTouching(otherPart: Instance)

Deprecated. Use TouchEnded instead.

TouchEnded(otherPart: Instance)

Fired when the part stops touching another part

Touched(otherPart: Instance)

This event will be fired by the game engine when a part touches the part to which the event belongs.

touched(otherPart: Instance)

This event is deprecated. The Touched event should be used instead.

Advertisement