The object browser displays information about every object, class, and enum that is available in Roblox.
You can access the Object Browser by going to Help > Object Browser, in Roblox Studio.
Once you click this, a new tab will open up titled “Object Browser”. This window has some very important information about the objects that you can create in Roblox. There are three panels in this window: the left-most panel is the class and enum list, the top-right panel is the member list, and the bottom-right panel is the details list.
The class panel contains a list of all available classes in Roblox. By default, this panel lists all instantiable classes and all enum types. This list is sorted by alphabetical order, with classes first, then enum types. The classes are denoted by an icon with a yellow, diagonal rectangle with a purple and blue diamond. The enums are denoted by an icon with two yellow, rounded-corner rectangles.
Classes are groups of data that can be instantiated. In Roblox, you create an object by using the Instance.new function. This function creates a new object that has the same class as you supplied. This object has the properties, methods, and events of the class. These properties, methods, and events are used with Lua scripts to manipulate the game.
Enums, short for
Enumeration, is just a value. Typically, enumerations are used when an object can have one of a specific, limited set of distinct values. To compare, the Name of an Part can be any sequence of characters.
The member panel lists all of the properties, methods, and events of a class, and the available values of an enum.
Properties, Methods, and Events
When you click on a class in the Class Panel, a list of available properties, methods, and events are displayed in this panel. These members are listed alphabetically in order and are grouped into Methods first, Properties second, and Events third. Methods are denoted by a purple diamond. Properties are denoted by a blue diamond. Events are denoted by a yellow lightning bolt.
When you click on an enum in the Class Panel, a list of values that are associated with the enum is displayed. Enum values are denoted by a white box with a yellow, rounded-corner box behind it.
If you have set the view level to RobloxScript, you will see some items that have a yellow key in the bottom-left corner of their icon. This indicates that the method, property, or event cannot be used from a Script or LocalScript, whether for reading the value or assigning it.
The detail panel is probably the most important panel of the three. The detail panel gives you information about a selected class, enum, method, property, or event.
When you select a class in the Class Panel, some information about the class is displayed in this panel. Firstly, you will see the inheritance of the class you selected (that is, what the class is “made out of”). The second piece of information you will see is a Summary. The summary is a brief explanation of the class you selected. Let us look at a Part. When you select Part, the first line you see is Part -> BasePart -> PVInstance -> Instance. This means the Part inherits from the BasePart class, which also inherits from the PVInstance class, which then ultimately inherits from the Instance class.
When a class inherits another class, it means the class contains members from the inherited class. In this case, a Part contains a Touched event, which is part of the BasePart class. These “parent” classes are associated to the selected class on an Is-A basis. That is, a Part Is-A BasePart, Is-A PVInstance, and Is-A Instance. As a result, the return value of the IsA method called on a part is true for these values: “Part”, “BasePart”, “PVInstance”, “Instance”.
I personally like to think of inheritance as the relationship between a rectangle and a square. The square inherits the rectangle. We can also verbally explain this as “a square is always a rectangle, but a rectangle is not always a square”. The same applies to the part. A Part is always a BasePart, but a BasePart is not always a Part.
Inheritance is an advanced subject in programming, so don’t worry if you don’t understand it right now.
When you select a method from the Member Panel, some key information about the method is displayed in this panel. The first line you see is called the signature of the method. A method’s signature defines its return type and parameter types. The second line tells you where the method came from (that is, which class contains this method). Then a brief summary explaining the method is shown. Let us examine the IsA method of the Part class.
bool IsA(string className) Member of Instance Summary: Returns a boolean if this Instance is of type 'className' or a is a subclass of type 'className'. If 'className' is not a valid class type in Roblox, this function will always return false. More info
The first line,
bool IsA(string className), defines the method’s signature. This tells you that the IsA method returns a bool value (short for boolean) and takes a string as its only argument, when called as a method. The second line is
Member of Instance, telling you that the
IsA method does not actually belong to the
Part class; it actually belongs to the
Instance class. This means every class that inherits the Instance class will contain the IsA method. Lastly, a summary containing information about the method is displayed.
When you select a property from the Member Panel, details will be displayed about the selected property. There are only three parts to the property details. The first portion is the type of value the property is. The second tells you which class the property belongs to, and the third is a summary of the property. Let us examine the Anchored property of the Part class.
bool Anchored Member of BasePart Summary: 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.
The first line tells us that the Anchored property contains a bool value. The second line tells us that the Anchored property does not actually belong to Part, but belongs to the BasePart class. Lastly, there is a short summary describing the purpose of the Anchored property.
When you select an event from the Member Panel, information about the event is displayed. The first line tells you what the event returns. The second line tells you which class the event belongs to, and lastly, a summary of the event is given. Let’s take a look at the DescendantAdded event of the Part class.
event DescendantAdded(Instance descendant) Member of Instance Summary: Fired after an Instance is parented to this object, or any of this object's descendants. The descendant argument is the Instance that is being added.
The first line tells us that the
DescendantAdded event returns an
Instance, or an object. The second line tells us that this event belongs to the
Instance class (again, not the Part class). The summary then explains what the event does and when it is fired.
For events, the returned value is passed on to the calling function. When you connect a function to an event, whatever values the event returns is passed to the connected function. If I connect the following function to a DescendantAdded event:
function a(param) end
param will become the descendant object that was added, which is the return value of the
When selecting an enum, the only thing displayed in this panel is the name of the enum. This name is used to access the enum values associated with the selected enum. Then an enum value is selected, the only thing that is displayed is the zero-based integer value associated with the value and the name of the value, separated by a colon. If I select the NormalId enum, the details panel will contain
NormalId. If I select the NormalId enum then select the Top enum value, the details panel will contain 1: Top.
If you have enabled the viewing of Deprecated objects and set the view level to RobloxScript, you will notice some other information displayed in this panel. If you select a deprecated item, denoted by a strike-through font, some nice red text will kindly explain to you that the member you selected is deprecated and should not be used. This means Roblox no longer supports the use of this method, property, or event, and it will not be fixed if a future update breaks it. If you select an item with a black padlock in the bottom-left corner of its icon, that means the item you selected is preliminary and should only be used for testing. Some nice red text will also notify you of these preliminary objects.
By editing the
ReflectionMetadata.xml file that comes with Roblox, you can make some hidden classes visible in Roblox Studio and in the object browser.