ScriptContext

사용되지 않는 항목 표시
만들 수 없음
서비스
복제되지 않음

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.

요약

메서드

  • SetTimeout(seconds : number):void
    플러그인 보안

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

이벤트

속성

메서드

SetTimeout

void
플러그인 보안

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

매개 변수

seconds: number

반환

void

이벤트

Error

Fired when an error occurs.

매개 변수

message: string
stackTrace: string
script: Instance

코드 샘플

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!")