Introducing ReflectionService: Programmatic Access to Engine API Information

[Update] February 12, 2026


Hi Creators,

We’re excited to announce the release of ReflectionService, a new service that allows you to programmatically inspect the Roblox engine’s API surface. You can use ReflectionService to create systems that depend on changes to the API surface and leverage information about the engine API, such as API inspection plugins to analyze and use new API releases and better instance class changing plugins for faster workflows in Studio.

How to Use ReflectionService

Currently, ReflectionService is focused on providing detailed information about Instances and their Properties. ReflectionService exposes three primary methods for retrieving this API information:

1. ReflectionService:GetClass(string className, ReflectionClassFilter filter = {})

  • Pass in the name of an instance (e.g., "Part", "MeshPart") to retrieve information about its instance hierarchy and access privileges.
  • Optional: The filter argument can be used to refine the output, such as expanding the data returned or specifying the security context for access checks.

2. ReflectionService:GetClasses(ReflectionClassFilter filter = {})

  • Returns information about all instances in the engine that are accessible to the current security context.
  • Optional: Use the filter argument to narrow the output or request expanded details.

3. ReflectionService:GetPropertiesOfClass(string className, ReflectionClassFilter filter = {})

  • Pass in an instance name (e.g., "Part") to get comprehensive information about all its properties, including its data type, whether it is serialized (saved/loaded), and its access security level.
  • Optional: The filter argument allows you to customize the details you receive.

You can browse full documentation for the service using this link.

Understanding Security Capabilities

ReflectionService filters the output from its methods using SecurityCapabilities. This bitset-like value describes the access a given script execution context has to certain functionality, including APIs.

By default, ReflectionService will only return instances and properties that are accessible according to the SecurityCapabilities assigned to the current script execution context (e.g., a Plugin, a ModuleScript, or a regular game script). This means the output will differ based on where the code is run.The filter argument allows you to modify the security context used for the query.

Limiting the Context (Zero Capabilities)

If you limit the context to include no capabilities, you’ll receive the subset of classes that are accessible in all security contexts.

local ReflectionService = game:GetService("ReflectionService")

-- Create a SecurityCapabilities object with no capabilities
local noCapabilities = SecurityCapabilities.new()

-- Get all classes accessible with no capabilities
local allClassesWithNoSecurity = ReflectionService:GetClasses({ Security = noCapabilities })
print("Total classes:", #allClasses)

Expanding the Context (All Capabilities)

If you expand the context to include all capabilities, you’ll receive virtually all classes and properties in the engine from ReflectionService, including all serialized classes and properties in the API.

local ReflectionService = game:GetService("ReflectionService")

-- Create a SecurityCapabilities object with all capabilities
local allCapabilities = SecurityCapabilities.new(table.unpack(Enum.SecurityCapability:GetEnumItems()))

-- Get all classes accessible with all capabilities
local allClasses = ReflectionService:GetClasses({ Security = allCapabilities })
print("Total classes:", #allClasses)

A Quick Example: The Instance Spawner Plugin

To demonstrate how to iterate over accessible classes, here is a small (and silly) plugin script. It’ll attempt to create one instance of every creatable class accessible to the plugin’s security context, all placed in a single folder in Workspace! (Plugin Link)

Plugin Script
local ReflectionService = game:GetService("ReflectionService")
local Workspace = game:GetService("Workspace")
local ChangeHistoryService = game:GetService("ChangeHistoryService")

local toolbar = plugin:CreateToolbar("ReflectionService Demo")
local createInstancesButton = toolbar:CreateButton(
	"Create Instances",
	"Create all instances accessible in the current security context",
	"rbxassetid://14978048121"
)

createInstancesButton.ClickableWhenViewportHidden = true

local function onPluginButtonClicked()
	-- Get all classes from ReflectionService in the current security context
	local classes = ReflectionService:GetClasses()

	-- Filter for creatable classes
	local creatableClasses = {}
	for _, classInfo in ipairs(classes) do
		if classInfo.Permits and classInfo.Permits.New then
			table.insert(creatableClasses, classInfo.Name)
		end
	end
	table.sort(creatableClasses)

	-- Create instances folder in Workspace
	local instancesFolder = Instance.new("Folder")
	instancesFolder.Name = "AllInstances_" .. os.time()
	instancesFolder.Parent = Workspace

	local createdCount = 0
	local failedCount = 0
	local currentY = 1.5 -- Track Y position for stacking instances with CFrame

	-- Attempt to create one instance of each creatable class
	for _, className in ipairs(creatableClasses) do
		local success, instance = pcall(function()
			return Instance.new(className)
		end)

		if success and instance then
			local setSuccess, setError = pcall(function()
				instance.Name = className
				instance.Parent = instancesFolder

				-- Check if instance has CFrame property and stack it on top of previous instances
				local hasCFrame = false
				pcall(function()
					local _ = instance.CFrame
					hasCFrame = true
				end)

				if hasCFrame then
					local height = 2 -- Default height if we can't determine size

					-- Try to get the actual size/height of the instance
					if instance:IsA("BasePart") then
						height = instance.Size.Y
					else
						local sizeSuccess, size = pcall(function()
							return instance.Size
						end)
						if sizeSuccess and size then
							height = size.Y
						end
					end

					-- Set CFrame to stack on top
					local newCFrame = CFrame.new(0, currentY + height / 2, 0)
					local setCFrameSuccess = pcall(function()
						instance.CFrame = newCFrame
					end)

					if setCFrameSuccess then
						-- Update currentY for next instance
						currentY = currentY + height
					end
				end
			end)

			if setSuccess then
				createdCount = createdCount + 1
			else
				warn("Failed to set properties for instance of class: " .. className .. " - " .. tostring(setError))
				failedCount = failedCount + 1
			end
		else
			warn("Failed to create instance of class: " .. className)
			failedCount = failedCount + 1
		end
	end

	ChangeHistoryService:SetWaypoint(string.format("Created %d instances (%d failed)", createdCount, failedCount))

	print(string.format("Created %d instances in Workspace.%s", createdCount, instancesFolder.Name))
end

createInstancesButton.Click:Connect(onPluginButtonClicked)

We look forward to seeing how you make the most of ReflectionService. Please share any feedback, suggestions, or questions you have.

Cheers,
The Roblox Engine Systems Team

245 Likes

This topic was automatically opened after 10 minutes.

Amazing


the humble workspace constant

98 Likes


YES!

25 Likes

I’ve been waiting for this for so long, I’m very excited to use this!

My API Service module will be updated with this (hopefully) within a day or so. Hopefully I’ll no longer have to deal with Roblox’s auto moderation due to the insanely large API dump that I previously had to work with.

(Although, now I’m not sure how much this module will be needed anymore.)

It looks like events and methods might not be included in this yet, so my module may still have some use.


Although, I would like to see simplified methods as well. My module, for example, returns an array of property names when using GetProperties(). I totally understand having the base methods give all of this extra information, the internals of my module require it, but having simplified methods would also be great for more casual usage.


This service is also still missing Tags, such as “Hidden”.

9 Likes

this is so tuff bro, you guys have been on such a roll lately with these new features

6 Likes

Can we use ReflectionService to make realistic reflections?

Currently having to use a bug with glass + highlights to achieve this SSR effect

(I know this isn’t related to ReflectionService, but it would be awesome to have a proper supported solution)

86 Likes

Where is the method that returns reflection stuff and api dump stuff that looks and starts like this:

{
    "Classes": [
        {
            "Members": [
                {

so that everything is included at all times and one can do whatever they want incase the other methods are not sufficient enough…

:thinking:

2 Likes

Are there plans to expand this service to include information like what a property serializes as? Based on the docs I’m seeing, there’s no way to e.g. know that Model.Scale is serialized as Model.ScaleFactor.

Also does this include entirely internal properties like SharedString properties and BasePart.siz?

17 Likes

This has been long-desired from many who wish to retain better control over their own projects.
Good stuff.

I would have to explore replacing the APIService module in my game with something like this.
The one thing I would probably appreciate is being able to filter via engine version so that I wouldn’t have to keep playing catch-up with how certain properties are changed over the years; that eats up time in maintenance and would further solidify not have to rely on an APIService module.

6 Likes

I am in love with this. Pure bliss.

This is like the Frieren of engine updates.

2 Likes

yes YES YESSS!!! I needed this in the past for so many things and this is gonna make things MUCH easier!!!

this is music to my ears, thank you roblox team

1 Like

Are the APIs exposed through this taken directly from what is accessible in the engine, or are they just from a human-curated list?

I guess more specifically, would it be safe to read/write to a property returned by this (given the correct security capabilities), or is it possible for an API that hasn’t yet been enabled to show up?

1 Like

Thanks for the question! Yes, it’s possible for APIs that aren’t yet enabled to be returned by ReflectionService as it uses the same reflection functions as the rest of the engine to determine its output. This means that it’ll also automatically update alongside the engine’s API surface.

8 Likes

Is there/will there be a way via ReflectionService to determine if something is enabled or not?

3 Likes

While this is useful for obtaining the properties of instances, will we eventually be able to obtain the methods and events of them as well using this same service? Having that data exposed would be useful for a couple of plugins I’ve made.

9 Likes

This is brilliant, no complaints.

Genuinely thought we were getting realistic reflections on Roblox :sob:

Amazing update though, I can use this for my plugin and games like that studio game

7 Likes

Damn this is a really good update!

1 Like