What is a basePart?

What is a BasePart? Here a screenshot of this:
what
Idk what it means tbh

2 Likes

Documentation

A base part is any part that is rendered into the workspace that can be seen in a 3D space. So like all parts, unions, models. That is atleast how I would explain it

Base part is a master class which contains all classes related to parts, such as Part, MeshPart, WedgePart, etc.

Example: if you have to loop through a model and do smth with all parts, you check if the instance is a part. However it will not work fkr meshes if you do instance:IsA(“Part”), forcing you to check other types using or.

Instead use :IsA(“BasePart”)

Every part, meshpart etc comes under basepart.

4 Likes

To put it simply, BasePart is a the Base class for Practically all Parts that are Rendered in the workspace, its where They inherit a lot of their Properties, In this case, it is responsible for Parts Mass, Materials, Positions, Faces, basically anything that makes a part.

But if you want to get really specific about what It actually is, you need to look deeper into its Class Tree.
Every single Object in Roblox is classified as an Instance, The Base class for everything if you will, but each Instance has a class that it would inherit from, but with the Example of Parts, They may Inherit from Instance, but the Class they are from is PVInstance, which stands for "Position Velocity Instance, Its a Class that Handles anything that has a Position in the World.

Take a look at this, if you look at the Left Side, you will see a tree of all the Instances in Roblox, along with their classes, with Instance being the Main class. You will find PVInstance there which I herits from Instance , and if you take a look, its child would be BasePart, the class responsible for all the Parts Rendered in the workspace

(Let me know if I made mistakes here, I dont exactly understand everything about every class)

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.