How to make a base part?

Hello, i am DestruidorDeHaters, first of all, sorry if this is in the wrong category, how do i make a Base Part ? i tried multiple times to find BaseParts on the object inserter but nothing, and i dont think the wiki says how to make a base part, thanks in advance!

2 Likes

BasePart is actually a grouping of all physical parts.
Part, WedgePart, MeshPart, etc.
The object itself does not exist. I’m simplifying this a little when I say it, but it basically acts as a template for all of the physical parts. So if the BasePart group has Transparency and BrickColor properties, then Parts, MeshParts, and etc. all have those properties. That is why it exists.

2 Likes

So its like a model primary part?

No. It’s more like this.

A BasePart is like a Car. A Car can be an Audi, a Chevrolet, a Nissan, a BMW, etc. But they all have a few things in common, such as a bumper and wheels.
A BasePart can be a Part, a MeshPart, a WedgePart, etc, and they all have Transparency, BrickColor, CanCollide, etc.
So it’s less a grouping and more of a way to refer to any kind of part - just like how ‘car’ is a way to refer to every kind of car.
If something is a BasePart, then it is a physical object with Transparency, CanCollide,etc.

3 Likes

So, its like the key part, like the Handle of a Tool?

1 Like

No. It is not any sort of part by itself, it is just a structure used in programming. If you are not a scripter, you can ignore the term.

If something is asking for a BasePart, that is asking for anything on this list that appears underneath BasePart.


In Object Oriented Programming, there is a thing called class inheritance. And at the risk of being confusing, that works like this. If you do get confused, you can jump to the last paragraph and not worry about this stuff.

Object BaseClothing
    Property Type
    Property Weight
    Property Cost

Object TShirt inherits BaseClothing
   Property Logo

Object Shoes inherits BaseClothing
   Property Size

Any TShirt object now has a Type, Weight, and Cost property because it inherits from BaseClothing. Shoes does as well. That is what is happening here. BasePart is a template, and the actual objects juist borrow behaviors from it. That way, everything on the list above behaves in pretty much the same way with no extra work. If I add or remove anything from BasePart or BaseClothing in the programming of the game, then everything inheriting it (below it on the list I showed) will change as well.

So in other words, if something is a BasePart, then that something is anything on that list underneath BasePart. A BasePart by itself is not a specific object. Imagine if I were to say “Go get me a tool.” What tool? I didn’t specify what tool. A screwdriver is a tool, sure, but not all tools are screwdrivers. That is what is going on. A Part is a BasePart, but a BasePart can also be other things, like a WedgePart. Just like a Tool refers to anything that does stuff, a BasePart refers to anything that is a physical object in the game.

So basepart is basically a table of properties taken from another part?

Other way around. It is a table of properties and behaviors, and any type of part in the game uses the behaviors and properties of BasePart.

So like this:

local a = script.Parent.Basepart

local b = script.Parent.Random

local c = {a.Anchored,a.Color,a.CanCollide,a.CastShadow,a.Size,a.Shape}

b.Anchored = c[1]

b.Color = c[2]

b.CanCollide = c[3]

b.CastShadow = c[4]

b.Size = c[5]

b.Shape = c[6]

No, not really.
Baseparts are just a way to refer to any type of part. Wedge, MeshPart, Part, ect.