Currently, a mod script gives a full stack trace of an error, no mod scripts do not.
As a creator, this means it is not possible to get a detailed error report from a script you have sent to other users.
Example of error when the script is mod (current behavior):
Object [script:test error debug lua script] Script run-time error
'state_entry' is not a supported event name
[C] function on
[C] function __newindex
lua_script:2
Example of error when the script is no mod (current behavior):
Object [script:test error debug lua script] Script run-time error
runtime error
This is rightfully done due to the concern of leaking source code info publicly. However, it can be a major headache when trying to troubleshoot issues.
Adding a debug flag to scripts to enable public stack traces so a creator can choose to send a no mod script with debugging enabled would solve this use case.
With the debug flag enabled, the script would then report the errors just like they do when the script is mod, but the script could remain no mod.
This flag should apply to both lsl-luau and lua as they are both affected by this behavior.