SceneAnalysisService
| Memory category | Instances |
|---|
Member index 6
Description
Provides programmatic access to the Scene Analysis tool's underlying performance data.
History 7
Members 6
GetAnimationMemoryAsync
| Parameters (0) | ||
|---|---|---|
| No parameters. | ||
| Returns (1) | ||
| Dictionary | ||
Returns loaded animation clip memory. The same asset shared by multiple Animators appears only once, with all owners listed.
Root dictionary
| Key | Type | Description |
|---|---|---|
Name | string | Always "AnimationMemory". |
Size | number | Total loaded clip memory in bytes. |
Children | array | Array of clip entries and optionally an out-of-data model group. |
Clip entry
Each child in Children is either a clip entry or the "not in data model"
group (see below).
| Key | Type | Description |
|---|---|---|
Name | string | The asset ID (e.g. "rbxassetid://111"). |
Size | number | Clip memory in bytes. |
AssetId | string | The asset ID string (same value as Name). |
Owners | array | Array of owner entries for all Animators playing this clip. |
Owner entry
| Key | Type | Description |
|---|---|---|
Name | string | Full path to the owning Animator (e.g. "Workspace.NPC.Humanoid.Animator"). |
ClassName | string | Class name of the owner (e.g. "Animator"). |
"Not in data model" group
Clips from Animators held only by Lua (not parented in the data model) are collected into a single group entry.
| Key | Type | Description |
|---|---|---|
Name | string | Always "Not In DataModel". |
Size | number | Sum of clip bytes in this group. |
Children | array | Array of clip entries (same schema as above). |
Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | |
| Thread safety | Unsafe |
|---|
History 1
GetAudioMemoryAsync
| Parameters (0) | ||
|---|---|---|
| No parameters. | ||
| Returns (1) | ||
| Dictionary | ||
Returns loaded audio asset memory, deduplicated by asset ID. Assets whose
owners share the same parent are organized under that parent path —
flattened when there is one child, nested when there are several. Assets
whose owners span different parents appear as shared entries with an
Owners array.
Root dictionary
| Key | Type | Description |
|---|---|---|
Name | string | Always "AudioMemory". |
Size | number | Total loaded audio memory in bytes. |
Children | array | Mix of flat entries, parent groups, and shared entries. |
Flat asset entry
Emitted when a parent has exactly one audio child.
| Key | Type | Description |
|---|---|---|
Name | string | Full instance path (e.g. "Workspace.Map.BGMusic"). |
Size | number | Asset memory in bytes. |
AssetId | string | The audio asset ID. |
Parent group
Emitted when a parent has multiple audio children.
| Key | Type | Description |
|---|---|---|
Name | string | Parent path (e.g. "Workspace.Map.SFX"). |
Size | number | Sum of child asset bytes. |
Children | array | Array of flat asset entries (each with Name, Size, AssetId). |
Shared asset entry
Emitted when an asset's owners are under different parents.
| Key | Type | Description |
|---|---|---|
Name | string | The asset ID. |
Size | number | Asset memory in bytes. |
AssetId | string | The asset ID string (same value as Name). |
Owners | array | Array of owner entries. |
Owner entry
| Key | Type | Description |
|---|---|---|
Name | string | Full instance path (e.g. "Workspace.Zone1.Ambient"). |
ClassName | string | "Sound" or "AudioPlayer". |
Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | |
| Thread safety | Unsafe |
|---|
History 1
GetInstanceCompositionAsync
| Parameters (0) | ||
|---|---|---|
| No parameters. | ||
| Returns (1) | ||
| Dictionary | ||
Returns instance counts by category and class from the data model tree. Scans descendants of Workspace, Players, Lighting, MaterialService, ReplicatedFirst, ReplicatedStorage, ServerScriptService, ServerStorage, StarterGui, StarterPack, StarterPlayer, Teams, SoundService, and TextChatService. Each instance is classified into one of the categories below based on its class hierarchy.
Root dictionary
| Key | Type | Description |
|---|---|---|
Name | string | Always "InstanceComposition". |
Size | number | Total instance count across all scanned services. |
Children | array | Array of category entries. |
Category entry
| Key | Type | Description |
|---|---|---|
Name | string | Category name (see table below). |
Size | number | Total instances in this category. |
Children | array | Array of class entries. |
Class entry (leaf)
| Key | Type | Description |
|---|---|---|
Name | string | The class name (e.g. "Part", "Script", "Frame"). |
Size | number | Number of instances of this class. |
Categories
| Category | Representative Types |
|---|---|
| 3D Objects | BasePart, Model, Camera |
| Physics | Attachment, Constraint, JointInstance, WeldConstraint, ControllerManager, SensorBase |
| UI | GuiBase, BasePlayerGui, UIBase, ProximityPrompt, ClickDetector, TextChannel |
| Lights | Light |
| PostProcessing | PostEffect, Highlight, Atmosphere, Sky, Clouds |
| Scripts | LuaSourceContainer, BindableEvent, RemoteEvent, RemoteFunction |
| Audio | Sound, SoundEffect, AudioPlayer, Wire, SoundGroup, AudioEmitter |
| Animation | Animator, AnimationController, Animation, KeyframeSequence, IKControl |
| Values | ValueBase |
| Character | CharacterAppearance, Humanoid, HumanoidDescription, BaseWrap, FaceControls |
| Textures | FaceInstance, SurfaceAppearance, MaterialVariant |
| Meshes | DataModelMesh |
| Particles | ParticleEmitter, Fire, Trail, Beam, Explosion |
| Services & Storage | Player, Folder, Configuration |
| Misc | Tool, Backpack, Team, ForceField, PathfindingModifier, PackageLink, HapticEffect |
| Unclassified | Anything not matching the above |
Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | |
| Thread safety | Unsafe |
|---|
History 1
GetScriptMemoryAsync
| Parameters (0) | ||
|---|---|---|
| No parameters. | ||
| Returns (1) | ||
| Dictionary | ||
Returns per-script Luau VM heap memory usage in bytes. Scripts are grouped
first by their containing service (derived from the first segment of the
dotted path), then split into "ModuleScripts" and "Scripts" subgroups
based on the instance's class.
Root dictionary
| Key | Type | Description |
|---|---|---|
Name | string | Always "ScriptMemory". |
Size | number | Total Luau VM memory in bytes. |
Children | array | Array of service category entries. |
Service category entry
| Key | Type | Description |
|---|---|---|
Name | string | Service name (e.g. "ServerScriptService", "ReplicatedStorage"). |
Size | number | Sum of all script memory in this service, in bytes. |
Children | array | One or two script-type group entries ("ModuleScripts" and/or "Scripts"). |
Script-type group entry
| Key | Type | Description |
|---|---|---|
Name | string | Either "ModuleScripts" or "Scripts". |
Size | number | Sum of memory for scripts in this group, in bytes. |
Children | array | Array of individual script entries. |
Script entry (leaf)
| Key | Type | Description |
|---|---|---|
Name | string | Dotted path to the script (e.g. "ServerScriptService.Shared.Utils"). |
Size | number | Heap memory used by this script, in bytes. |
Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | |
| Thread safety | Unsafe |
|---|
History 1
GetTriangleCompositionAsync
| Parameters (0) | ||
|---|---|---|
| No parameters. | ||
| Returns (1) | ||
| Dictionary | ||
Returns triangle and draw call counts by render pass, sourced from
StatsService performance data. Unlike other queries, this uses a Sizes
dictionary (with Triangles and Drawcalls keys) instead of a single
Size field. Render pass entries with zero triangles and zero draw calls
are omitted.
Root dictionary
| Key | Type | Description |
|---|---|---|
Name | string | Always "TriangleComposition". |
Sizes | dictionary | { Triangles: number, Drawcalls: number } — totals across all passes. |
Children | array | Array of render pass entries. |
Render pass entry (leaf)
| Key | Type | Description |
|---|---|---|
Name | string | Render pass type (see table below). |
Sizes | dictionary | { Triangles: number, Drawcalls: number } for this pass. |
Render pass types
| Name | Description |
|---|---|
| Opaque | Opaque geometry |
| Transparent | Transparent geometry |
| Terrain | Voxel/smooth terrain |
| Grass | Terrain grass decoration |
| UI | Screen-space UI |
| Decal | Decal rendering |
| Cloud | Volumetric clouds |
| GenericPostProcess | Generic post-processing |
| SSAO | Screen-space ambient occlusion |
| DOF | Depth of field |
| Particles | Particle systems |
| Sky | Skybox |
| Shadows | Shadow map rendering |
| Undefined | Uncategorized |
Example
1 2 3 4 5 6 7 8 9 10 | |
| Thread safety | Unsafe |
|---|
History 1
GetUnparentedInstancesAsync
| Parameters (0) | ||
|---|---|---|
| No parameters. | ||
| Returns (1) | ||
| Dictionary | ||
Returns instances held by Luau but no longer in the data model, grouped by host script. Each unparented instance is traced back to the script that holds the reference.
Unparented instances that are flagged for garbage collection but not yet
deleted are temporarily shown with a parent of Unknown. This is a side
effect of how garbage collection is intended to work and not indicative of
any problems.
Root dictionary
| Key | Type | Description |
|---|---|---|
Name | string | Always "UnparentedInstances". |
Size | number | Total count of unparented instances. |
Children | array | Array of host script entries. |
Host script entry
| Key | Type | Description |
|---|---|---|
Name | string | Script path (e.g. "ServerScriptService.Gameplay.Combat") or "(unknown)" if untraceable. |
Size | number | Count of unparented instances held by this script. |
Children | array | Array of class entries. |
Class entry (leaf)
| Key | Type | Description |
|---|---|---|
Name | string | Class name of the unparented instance (e.g. "Part", "Frame", "Sound"). |
Size | number | Count of unparented instances of this class from this host script. |
Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | |
| Thread safety | Unsafe |
|---|