ScriptContext
Tampilkan yang Tidak Digunakan Lagi
*Konten ini akan segera tersedia dalam bahasa pilihanmu.
This service controls all BaseScript objects. Most of the properties and methods of this service are locked for internal use.
Rangkuman
Metode
Limits how long a script is allowed to run without yielding.
Acara
Fired when an error occurs.
Properti
Metode
SetTimeout
void
Limits how long a script is allowed to run without yielding.
Parameter
Memberikan nilai
void
Acara
Error
Fired when an error occurs.
Parameter
Contoh Kode
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!")