FANDOM


The BasePart class is a structural class that holds all the properties, methods and events common to part classes, such as ExplorerImageIndex 1Part, ExplorerImageIndex 1WedgePart, ExplorerImageIndex 1CornerWedgePart, ExplorerImageIndex 1TrussPart, ExplorerImageIndex 25SpawnLocation, ExplorerImageIndex 35Seat, ExplorerImageIndex 35VehicleSeat, ExplorerImageIndex 35SkateboardPlatform, and ExplorerImageIndex 39FlagStand. 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

Pubfield bool Anchored

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.

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

Pubfield CoordinateFrame CFrame

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

Pubfield bool CanCollide

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.

Pubfield Vector3 CenterOfMass [readonly]

Pubfield int CollisionGroupId

The id of the collision group this basepart is in. This can be used with PhysicsService.

Pubfield Color3 Color

The Color3 of the BasePart.

Pubfield PhysicalProperties CustomPhysicalProperties

A container that allows you to edit the properties of this basepart.

Pubfield float Elasticity

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.

Pubfield float Friction

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.

Pubfield float LocalTransparencyModifier [hidden]

Pubfield bool Locked

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

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

Pubfield Vector3 Orientation

Rotation around X, Y, and Z axis. Rotations applied in YXZ order.

Pubfield Vector3 Position

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

Pubfield float ReceiveAge [hidden] [readonly]

Pubfield float Reflectance

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

Pubfield int ResizeIncrement [readonly]

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

Pubfield Faces ResizeableFaces [readonly]

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

Pubfield Vector3 RotVelocity

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

Pubfield Vector3 Rotation

The part's rotation.

Pubfield Vector3 Size

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

Pubfield float SpecificGravity [deprecated] [readonly]

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

Pubfield float Transparency

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

Pubfield Vector3 Velocity

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.

Pubfield BrickColor brickColor [deprecated]

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.

Pubfield InputType BackSurfaceInput

Pubfield InputType BottomSurfaceInput

Pubfield InputType FrontSurfaceInput

Pubfield InputType LeftSurfaceInput

Pubfield InputType RightSurfaceInput

Pubfield InputType TopSurfaceInput

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.

Pubfield SurfaceType BackSurface

Pubfield SurfaceType BottomSurface

Pubfield SurfaceType FrontSurface

Pubfield SurfaceType LeftSurface

Pubfield SurfaceType RightSurface

Pubfield SurfaceType TopSurface

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.

Pubfield float BackParamA

Pubfield float BackParamB

Pubfield float BottomParamA

Pubfield float BottomParamB

Pubfield float FrontParamA

Pubfield float FrontParamB

Pubfield float LeftParamA

Pubfield float LeftParamB

Pubfield float RightParamA

Pubfield float RightParamB

Pubfield float TopParamA

Pubfield float TopParamB

Methods

Pubmethod void BreakJoints()

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

Pubmethod bool CanCollideWith(Instance part)

Pubmethod Tuple CanSetNetworkOwnership()

Pubmethod Objects GetConnectedParts(bool recursive = false)

Pubmethod float GetMass()

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.

Pubmethod Instance GetNetworkOwner()

Pubmethod bool GetNetworkOwnershipAuto()

Pubmethod CoordinateFrame GetRenderCFrame() [deprecated]

Pubmethod Instance GetRootPart()

Pubmethod Objects GetTouchingParts()

Returns an array of all the parts touching this part.

Pubmethod bool IsGrounded()

Returns whether or not this BasePart is connected to an Anchored BasePart.

Pubmethod void MakeJoints()

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.

Pubmethod bool Resize(NormalId normalId, int deltaAmount)

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.

Pubmethod void SetNetworkOwner(Instance playerInstance = nil)

Pubmethod void SetNetworkOwnershipAuto()

Pubmethod void breakJoints() [deprecated]

Deprecated. Use BreakJoints instead.

Pubmethod float getMass() [deprecated]

Use GetMass instead.

Pubmethod void makeJoints() [deprecated]

Use MakeJoints instead.

Pubmethod bool resize(NormalId normalId, int deltaAmount) [deprecated]

Events

Pubevent RBXScriptSignal LocalSimulationTouched(Instance part) [deprecated]

Deprecated. Use Touched instead.

Pubevent RBXScriptSignal OutfitChanged() [deprecated]

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

Pubevent RBXScriptSignal StoppedTouching(Instance otherPart) [deprecated]

Deprecated. Use TouchEnded instead.

Pubevent RBXScriptSignal TouchEnded(Instance otherPart)

Fired when the part stops touching another part

Pubevent RBXScriptSignal Touched(Instance otherPart)

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

Pubevent RBXScriptSignal touched(Instance otherPart) [deprecated]

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

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.