What's the equivalent of 'BasePart' for UI objects?

I’m currently looking to modify all UI objects with properties such as ‘BackgroundColor3’, 'BorderColor3, ‘ZIndex’, etc. Some of these include Frames, TextButtons, TextLabels, etc. I was wondering, is there a particular class name for these?

For example, you can check if an Instance is Union, MeshPart, Part, etc by doing :IsA(“BasePart”)
How would you do the same for the UI objects mentioned above?

The GuiObject class is the base class of all 2D GUI elements:
image

If you’d like to include ScreenGuis, BillboardGuis, etc., GuiBase2d would be more appropriate. To include all GUI objects, including 3D GUI (such as Handles), use GuiBase.

The Developer Hub API reference has a useful class tree for things like this on its sidebar (though no dedicated page, which is a shame).

9 Likes

That’s great, thank you.