Skip to content
Roblox API Reference

ScriptProfilerService

A service that captures sampling-based profiles of Luau script execution on the server or on a client.
  • Not creatable
  • Service
Memory category
Instances
Own members
11
Inherited members
75
Subclasses
0
Siblings
608

Properties23

Inherited fromObject2

Property categoryData

Inherited fromInstance21

Property categoryBehavior

Property categoryData

Property categoryPermissions

Methods50

Inherited fromObject3
  • Get an event that fires when a given property of the object changes.
    Parameters
    ParameterDescription
    property: string
    The property to connect to.
    Returns
    TypeDescription
    RBXScriptSignal
    A signal that fires whenever the property changes.
  • Object:IsA(className: string): boolean
    Returns true if an object's class matches or inherits from a given class.
    • Custom Lua state
    • Thread safe
    Parameters
    ParameterDescription
    className: string
    The class against which the Object's class will be checked. Case-sensitive.
    Returns
    TypeDescription
    boolean
    Describes whether the Object's class matched or is a subclass of the given class.
  • Object:isA(className: string): boolean
    Deprecated: This deprecated function is a variant of Object:IsA() which should be used instead.
    • Deprecated
    • Custom Lua state
    Parameters
    Parameter
    className: string
    Returns
    Type
    boolean

    Use IsA instead.

Inherited fromInstance39
Defined byScriptProfilerService8
  • ScriptProfilerService:ClientRequestData(player: Player)
    Requests the current script profiling data from the specified player's client.
    • Plugin security
    Parameters
    ParameterDescription
    player: Player
    The Player whose client should report its profiling data. When called on a client, this must be the local player.
  • ScriptProfilerService:ClientStart(player: Player, frequency: number?)
    Begins Luau script profiling for the specified player's client.
    • Plugin security
    Parameters
    ParameterDescription
    player: Player
    The Player whose client should start profiling. When called on a client, this must be the local player.
    frequency: number?
    Optional sampling frequency in samples per second. Defaults to 1000 and must be within the range [1, 10000].
  • ScriptProfilerService:ClientStop(player: Player)
    Stops Luau script profiling for the specified player's client.
    • Plugin security
    Parameters
    ParameterDescription
    player: Player
    The Player whose client should stop profiling. When called on a client, this must be the local player.
  • ScriptProfilerService:DeserializeJSON(jsonString: string?): { [string]: any }
    Parses a script-profiling JSON string into a structured Luau table.
    • Custom Lua state
    • Plugin security
    Parameters
    ParameterDescription
    jsonString: string?
    The profiling data encoded as a JSON string, such as the value delivered by OnNewData.
    Returns
    TypeDescription
    { [string]: any }
    A dictionary representing the parsed profiling data, including the session's categories, call nodes, and function metadata.
  • ScriptProfilerService:SaveScriptProfilingData(jsonString: string,filename: string,): string
    • Roblox script security
    Parameters
    Parameter
    jsonString: string
    filename: string
    Returns
    Type
    string
  • ScriptProfilerService:ServerRequestData()
    Requests the current script profiling data from the server.
    • Plugin security
  • ScriptProfilerService:ServerStart(frequency: number?)
    Begins Luau script profiling on the server.
    • Plugin security
    Parameters
    ParameterDescription
    frequency: number?
    Optional sampling frequency in samples per second. Defaults to 1000 and must be within the range [1, 10000].
  • ScriptProfilerService:ServerStop()
    Stops Luau script profiling on the server.
    • Plugin security

Events13

Inherited fromObject1
Inherited fromInstance9
Defined byScriptProfilerService3
  • ScriptProfilerService.OnNewData: RBXScriptSignal<(player: Player,jsonString: string,)>
    Fires when a new profiling data snapshot becomes available after a data request.
    • Plugin security
    Parameters
    Parameter
    player: Player
    jsonString: string
  • ScriptProfilerService.RequestData: RBXScriptSignal<()>
    • Hidden
    • Roblox engine security
  • ScriptProfilerService.SetProfilingState: RBXScriptSignal<(start: boolean,frequency: number,)>
    • Hidden
    • Roblox engine security
    Parameters
    Parameter
    start: boolean
    frequency: number