6 min read

Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.

Object

Object is the base class for all classes in the Roblox class hierarchy. Every other class that the Roblox Engine defines inherits all of the members of Object. It is not possible to directly create an Object.

Descendants: Capture, ConfigSnapshot, EditableImage, EditableMesh, Instance, MLSession, VideoSampler, WebStreamClient, VirtualInput, PluginConnection

Memory category: Instances

Tags: NotCreatable, NotReplicated

Properties

NameType / ReturnsDescription
Object.ClassNamestringA read-only string representing the class this Object belongs to.
Object.classNamestring

Object.ClassName

A read-only string representing the class this Object belongs to.

This property can be used with various other functions that are used to identify objects by type, such as Object:IsA() or Instance:FindFirstChildOfClass().

Note this property is read only and cannot be altered by scripts. Developers wishing to change an object's class will instead have to create a new Object.

Unlike Object:IsA(), ClassName can be used to check if an object belongs to a specific class ignoring class inheritance. For example:

FieldValue
typestring
tags["ReadOnly","NotReplicated"]
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryData
serialization{"can_load":false,"can_save":false}

Code samples: View on Creator Hub (Object-ClassName).

Object.className

Deprecated. This deprecated property is a variant of Object.ClassName which should be used instead.

FieldValue
typestring
tags["ReadOnly","NotReplicated","Deprecated"]
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryData
serialization{"can_load":false,"can_save":false}

Methods

NameType / ReturnsDescription
Object:GetPropertyChangedSignalRBXScriptSignalGet an event that fires when a given property of the object changes.
Object:IsAbooleanReturns true if an object's class matches or inherits from a given class.
Object:isAboolean

Object:GetPropertyChangedSignal

This method returns an event that behaves exactly like the Changed event, except that it only fires when the given property changes. It's generally a good idea to use this method instead of a connection to Changed with a function that checks the property name. Subsequent calls to this method on the same object with the same property name return the same event.

ValueBase objects, such as IntValue and StringValue, use a modified Changed event that fires with the contents of their Value property. As such, this method provides a way to detect changes in other properties of those objects.

Note that this event will not pass any arguments to a connected function, so the value of the changed property must be read directly within a script.

Limitations

The event returned by this method does not fire for physics-related changes, such as when the CFrame, AssemblyLinearVelocity, AssemblyAngularVelocity, Position, or Orientation properties of a BasePart change due to gravity. To detect changes in these properties, consider using a physics-based event like RunService.PreSimulation.

Additionally, the returned event may not fire on every modification of properties that change very frequently, and/or it may not fire for such properties at all. It's recommended that you carefully test for property changes that impact game logic.

Parameters

NameTypeDefaultDescription
propertystringThe property to connect to.

Returns

TypeDescription
RBXScriptSignalA signal that fires whenever the property changes.
FieldValue
securityNone
thread safetyUnsafe

Code samples: View on Creator Hub (Changed-Old-to-New, Changed-and-GetPropertyChangedSignal).

Object:IsA

IsA returns true if the object's class is equivalent to or a subclass of a given class. This function is similar to the instanceof operators in other languages, and is a form of type introspection. To ignore class inheritance, test the ClassName property directly instead. For checking native Luau data types (number, string, etc) use the functions type and typeof.

Most commonly, this function is used to test if an object is some kind of part, such as Part or WedgePart, which inherits from BasePart (an abstract class). For example, if your goal is to change all of a character's limbs to the same color, you might use GetChildren to iterate over the children, then use IsA to filter non-BasePart objects which lack the BrickColor property:

local Players = game:GetService("Players")

local function paintFigure(character, color)
	-- Iterate over the child objects of the character
	for _, child in character:GetChildren() do
		-- Filter out non-part objects, such as Shirt, Pants and Humanoid
		-- R15 use MeshPart and R6 use Part, so we use BasePart here to detect both:
		if child:IsA("BasePart") then
			child.BrickColor = color
		end
	end
end
paintFigure(Players.Player.Character, BrickColor.new("Bright blue"))

Since all classes inherit from Object, calling object:IsA("Object") will always return true.

Parameters

NameTypeDefaultDescription
classNamestringThe class against which the Object's class will be checked. Case-sensitive.

Returns

TypeDescription
booleanDescribes whether the Object's class matched or is a subclass of the given class.
FieldValue
tags["CustomLuaState"]
securityNone
thread safetySafe

Code samples: View on Creator Hub (Instance-IsA1).

Object:isA

Deprecated. This deprecated function is a variant of Object:IsA() which should be used instead.

Parameters

NameTypeDefaultDescription
classNamestring

Returns

TypeDescription
boolean
FieldValue
tags["Deprecated","CustomLuaState"]
securityNone
thread safetyUnsafe

Events

NameType / ReturnsDescription
Object.ChangedFires immediately after a property of the object changes, with some limitations.

Object.Changed

This event fires immediately after an object property is changed, with some exceptions (see below). The new value of a changed property is not passed as a parameter. Instead, you can access it using object[property]:

object.Changed:Connect(function(property)
	print("The new property's value is", object[property])
end)

For ValueBase objects such as IntValue and StringValue, this event only fires when the object's Value property changes. To detect other changes in ValueBase objects, use GetPropertyChangedSignal().

Limitations

This event does not fire for physics-related changes, such as when the CFrame, AssemblyLinearVelocity, AssemblyAngularVelocity, Position, or Orientation properties of a BasePart change due to gravity. To detect changes in these properties, consider using a physics-based event like RunService.PreSimulation. Similarly, the Changed event does not fire when AssemblyMass updates due to a change in material, size, or density for a welded part (but the event does fire for Mass if you modify a part's size).

For properties that change frequently, the Changed event might not fire for every modification, or it might not fire at all. If a property change impacts your game logic, test carefully to ensure the event is firing as you expect.

Parameters

NameTypeDefaultDescription
propertystringThe name of the property that changed.
FieldValue
securityNone

Code samples: View on Creator Hub (Changed-Event, Change-Detector).