Reference API Roblox

Engine API

Website

Related

Reference API Roblox

ScriptContext

Summary

This class is not replicated. Its interface does not cross the network boundary.
This class is not creatable. Instances of this class cannot be created with Instance.new.
This class is a service. It is a singleton that may be acquired with GetService.
Tags: [NotCreatable, Service, NotReplicated]

Member index 14

HistoryMember
573AddCoreScriptLocal(name: string, parent: Instance): null
573ClearScriptProfilingData(): null
613DeserializeScriptProfilerString(jsonString: string?): Dictionary
462GetCoverageStats(): Array
607GetLuauHeapInstanceReferenceReport(target: string): Dictionary
607GetLuauHeapMemoryReport(target: string): Dictionary
600GetScriptProfilingData(): string
608SaveScriptProfilingData(jsonString: string, filename: string): string
573SetTimeout(seconds: double): null
573StartScriptProfiling(frequency: int?): null
562StopScriptProfiling(): string
462Error(message: string, stackTrace: string, script: Instance)
462ErrorDetailed(message: string, stackTrace: string, script: Instance, details: string, securityLevel: int)
inherited from Instance
553Archivable: bool
619Capabilities: SecurityCapabilities
553ClassName: string
553Name: string
553Parent: Instance
619Sandboxed: bool
616UniqueId: UniqueId
553className: string
576AddTag(tag: string): null
573ClearAllChildren(): null
462Clone(): Instance
573Destroy(): null
486FindFirstAncestor(name: string): Instance
486FindFirstAncestorOfClass(className: string): Instance
486FindFirstAncestorWhichIsA(className: string): Instance
486FindFirstChild(name: string, recursive: bool = false): Instance
486FindFirstChildOfClass(className: string): Instance
486FindFirstChildWhichIsA(className: string, recursive: bool = false): Instance
486FindFirstDescendant(name: string): Instance
563GetActor(): Actor
486GetAttribute(attribute: string): Variant
462GetAttributeChangedSignal(attribute: string): RBXScriptSignal
486GetAttributes(): Dictionary
486GetChildren(): Objects
462GetDebugId(scopeLength: int = 4): string
486GetDescendants(): Array
486GetFullName(): string
462GetPropertyChangedSignal(property: string): RBXScriptSignal
576GetTags(): Array
576HasTag(tag: string): bool
486IsA(className: string): bool
486IsAncestorOf(descendant: Instance): bool
486IsDescendantOf(ancestor: Instance): bool
580IsPropertyModified(name: string): bool
573Remove(): null
576RemoveTag(tag: string): null
580ResetPropertyToDefault(name: string): null
573SetAttribute(attribute: string, value: Variant): null
462WaitForChild(childName: string, timeOut: double): Instance
553children(): Objects
553clone(): Instance
573destroy(): null
553findFirstChild(name: string, recursive: bool = false): Instance
553getChildren(): Objects
462isA(className: string): bool
553isDescendantOf(ancestor: Instance): bool
573remove(): null
462AncestryChanged(child: Instance, parent: Instance)
462AttributeChanged(attribute: string)
462Changed(property: string)
462ChildAdded(child: Instance)
462ChildRemoved(child: Instance)
462DescendantAdded(descendant: Instance)
462DescendantRemoving(descendant: Instance)
500Destroying()
553childAdded(child: Instance)

Removed member index 17

HistoryMember
214GarbageCollectionFrequency: int
214GarbageCollectionLimit: int
272AddCoreScript(assetId: int, parent: Instance, name: string): void
273AddStarterScript(assetId: int): void
310GetHeapStats(clearHighwaterMark: bool = true): Tuple
310GetScriptStats(): Array
168LibraryRegistrationComplete(): void
168RegisterDevelopmentLibrary(libraryName: string, scriptInstance: Instance): void
168RegisterLibrary(libraryName: string, assetId: string): void
168RegisterRobloxLibrary(libraryName: string, assetId: string): void
401ResetCoverageCollection(): void
310SetCollectScriptStats(enable: bool = false): void
400SetCoverageFilter(callback: Function): void
401StartCoverageCollection(): void
401StopCoverageCollection(): void
310CamelCaseViolation(object: Instance, member: string, script: Instance)
76NonScriptableAccess(property: string, script: Instance)

History 91

Members 14

AddCoreScriptLocal

Parameters (2)
namestring
parentInstance
Returns (1)
null

History 3

ClearScriptProfilingData

Parameters (0)
No parameters.
Returns (1)
null

History 2

DeserializeScriptProfilerString

Parameters (1)
jsonStringstring?
Returns (1)
Dictionary
This function has a custom internal state. It may behave in a non-standard way.

History 2

Tags: [CustomLuaState]

Error

Parameters (3)
messagestring
stackTracestring
scriptInstance

History 3

  • 462 Change ThreadSafety of Error from to Unsafe
  • 135 Change Security of Error from RobloxPlaceSecurity to None
  • 47 Add Error

ErrorDetailed

Parameters (5)
messagestring
stackTracestring
scriptInstance
detailsstring
securityLevelint

History 3

GetCoverageStats

Parameters (0)
No parameters.
Returns (1)
Array

History 2

GetLuauHeapInstanceReferenceReport

Parameters (1)
targetstring
Returns (1)
Dictionary
This function has a custom internal state. It may behave in a non-standard way.

History 1

Tags: [CustomLuaState]

GetLuauHeapMemoryReport

Parameters (1)
targetstring
Returns (1)
Dictionary
This function has a custom internal state. It may behave in a non-standard way.

History 1

Tags: [CustomLuaState]

GetScriptProfilingData

Parameters (0)
No parameters.
Returns (1)
string

History 1

SaveScriptProfilingData

Parameters (2)
jsonStringstring
filenamestring
Returns (1)
string

History 4

SetTimeout

Parameters (1)
secondsdouble
Returns (1)
null

History 4

StartScriptProfiling

Parameters (1)
frequencyint?
Returns (1)
null

History 3

StopScriptProfiling

Parameters (0)
No parameters.
Returns (1)
string

History 4

Removed members 17

AddCoreScript

Parameters (3)
assetIdint
parentInstance
namestring
Returns (1)
void

History 2

AddStarterScript

Parameters (1)
assetIdint
Returns (1)
void

History 4

CamelCaseViolation

Parameters (3)
objectInstance
memberstring
scriptInstance

History 2

GarbageCollectionFrequency

TypeDefault
int

History 4

GarbageCollectionLimit

TypeDefault
int

History 4

GetHeapStats

Parameters (1)Default
clearHighwaterMarkbooltrue
Returns (1)
Tuple

History 3

GetScriptStats

Parameters (0)
No parameters.
Returns (1)
Array

History 4

LibraryRegistrationComplete

Parameters (0)
No parameters.
Returns (1)
void

History 3

NonScriptableAccess

Parameters (2)
propertystring
scriptInstance

History 2

RegisterDevelopmentLibrary

Parameters (2)
libraryNamestring
scriptInstanceInstance
Returns (1)
void

History 3

RegisterLibrary

Parameters (2)
libraryNamestring
assetIdstring
Returns (1)
void

History 3

RegisterRobloxLibrary

Parameters (2)
libraryNamestring
assetIdstring
Returns (1)
void

History 3

ResetCoverageCollection

Parameters (0)
No parameters.
Returns (1)
void

History 2

SetCollectScriptStats

Parameters (1)Default
enableboolfalse
Returns (1)
void

History 3

SetCoverageFilter

Parameters (1)
callbackFunction
Returns (1)
void

History 2

StartCoverageCollection

Parameters (0)
No parameters.
Returns (1)
void

History 2

StopCoverageCollection

Parameters (0)
No parameters.
Returns (1)
void

History 2

Settings