Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

MessageOut Event

Asked by
Muoshuu 583 Moderation Voter
6 years ago

Is there a way to find out which script errored?

3 answers

Log in to vote
3
Answered by
Merely 2117 Moderation Voter Community Moderator
6 years ago

Instead of using the LogService for getting script errors, I recommend using ScriptContext's error event. It gives you a reference to the script object that errored, as well as the stack trace and the error message.

game:GetService("ScriptContext").Error:connect(function(message, trace, script)
    print(script:GetFullName().." errored!")
    print("Reason: "..message)
    print("Trace: "..trace)
end)

(This example was taken from the wiki page for ScriptContext.Error)

Ad
Log in to vote
1
Answered by 6 years ago

You can use this event to see the errors. You can also use the log service, although it might not be enabled right now.

Log in to vote
-2
Answered by
Nytroz 15
6 years ago

I believe it is the Output Window

0
I mean, when the event is fired I want to know which script errored Muoshuu 583 — 6y
0
Script Performance? Nytroz 15 — 6y
0
I also mean In-Game Muoshuu 583 — 6y
0
I'm not sure how to check In-Game, but your best bet is running server Tools-Test-Play Solo Nytroz 15 — 6y
0
I'm creating an In-Game output system Muoshuu 583 — 6y

Answer this question