ScriptContext

Mostrar obsoleto
no creable
servicio
no replicado

This service controls all BaseScript objects. Most of the properties and methods of this service are locked for internal use, however you may use the ScriptContext.ScriptsDisabled property to disable all scripts from a thread with normal security access.

Resumen

Métodos

  • SetTimeout(seconds : number):void
    seguridad del plugin

    Limits how long a script is allowed to run without yielding.

Eventos

Propiedades

Métodos

SetTimeout

void
seguridad del plugin

Limits how long a script is allowed to run without yielding.

Parámetros

seconds: number

Devuelve

void

Eventos

Error

Fired when an error occurs.

Parámetros

message: string
stackTrace: string
script: Instance

Muestras de código

ScriptContext.Error

local ScriptContext = game:GetService("ScriptContext")
local function onError(message, trace, script)
print(script:GetFullName(), "errored!")
print("Reason:", message)
print("Trace:", trace)
end
ScriptContext.Error:Connect(onError)
-- Somewhere, in another script
error("Error occurred!")