Script errors are logged incorrectly, show incorrect source

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

Screenshot


^ Here, “PTA R68” is the model that the script is under. Instead, it refers to the script under “PTA PX-1R Overhauled” and “PTA R160B Alstom.”

For reference, these are the scripts it is referring to/should refer to:
image
image
image

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!

3 Likes

Thanks for the report! I filed a ticket in our internal database and we’ll follow up when we have an update for you.

1 Like

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?

2 Likes

Would appreciate a response to this. Being able to correctly see what script the error is from without having to click on it is important for clarity.

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.
image
image
image
image

1 Like

This obviously isn’t correct.

1 Like

So uh…

Any plans on answering the guy’s question?

1 Like

Still don’t understand why this issue is not being addressed when it is causing confusion and misleading developers.

1 Like