이 서비스는 모든 BaseScript 개체를 제어합니다. 이 서비스의 대부분의 속성과 메서드는 내부 사용을 위해 잠겨 있습니다.
요약
메서드
스크립트가 중단되지 않고 실행될 수 있는 시간을 제한합니다.
이벤트
오류가 발생하면 해고됩니다.
속성
메서드
이벤트
Error
오류가 발생하면 해고됩니다.
매개 변수
코드 샘플
When an error occurs, this example prints the name of the script that errored, the reason it errored, and a trace of the error.
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!")