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