Summary
Errors for scripts showing up in the game console (and I believe Roblox Studio output as well) refer to the wrong script below the error. I would know this as I created these scripts. It’s the same exact script but in a different location, yet the script it refers to would never try to refer to the instance that is mentioned in the script error.
Expected Results
Console and output should refer to the correct script in a script error
Actual Results
Console and output refer a similar but incorrect script for a script error
Reproduction file was attached to the internal ticket by a Roblox Staff (@Focia19), due to the sensitive information it may contain, will not be shared publicly!
We re-use copies of the script that are exact copies of each other for improved performance and memory.
This can show up as error messages from one part of the datamodel having source paths of another part that was reused.
We are not planning to fix this.
Mouse click on the error message will still jump to the correct instance.
I understand the part about reusing scripts, but it is still very confusing to see errors do this and it misleads me when I try to debug these scripts. Would there be any way for it to display the actual location of the script it’s referring to while still reusing scripts?
I just saw someone else get confused about their errors as a result of this issue. It’s not just something I’m experiencing or being inconvenienced by.
A lot of developers experiencing this issue may not even notice they’re not going to the script being printed to the output, and when they do, they’re likely not to know why this is happening. The chances of them knowing this was done on purpose is even less, as I did not even know either until I reported the bug.