Trying to run the sample for ScriptContext.Error:
local ScriptContext = game:GetService("ScriptService")
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("Oh noes")
I get:
Error is not a valid member of ScriptService “Instance”
Stack Begin
Script ‘ServerScriptService.Script’, Line 9
Stack End
What’s wrong?