Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

"Maximum event re-entrancy depth exceeded for ScriptContext.Error"?

How do I prevent this from happening?

It's specifically pointing out line 1 is causing the error

game:GetService("ScriptContext").Error:Connect(function(message, trace, theScript)
	if theScript then
		print(theScript:GetFullName())
	end
end)

1 answer

✓ Accepted answer

The short answer is that you're erroring in a callback function that's called for every error.

Link150 has an extended explanation that details recursive functions.

1 comment

0

Thanks that helped.

This discussion is preserved as it was. New answers, comments, and votes are closed.