Accidently Duplicating Scripts - Repro steps and needed change

Currently, when opening a script in studio by double clicking it, the script is left selected in the Explorer. This causes problems, especially for a programmer like me who loves to use shortcuts when editing scripts such as CTRL + F, CTRL + G and so on.

The issue arises when I make a typo and press CTRL + D, causing the script to DUPLICATE unintentionally. This can become a bad mess quickly when I have 2 scripts running the same code and the game spitting out errors left and right, causing me to waste 10-25 minutes on each episode of this typo occurring trying to fix it, only to realize the dumb mistake I’ve made. Then I thought that it was strange how the script was left selected when editing. On a game I’ve been working on, I did this twice, each wasting time trying to resolve the mystery bug.

If this issue is addressed, it would improve my development experience… as F and D are keys that are super close to each other, and I’m pretty sure I’m not the only programmer whose made this mistake before. Take a look at this:

I’m sure this is what they are referring to, but couldn’t find out how it was done or why.

There as a few possible solutions to avoid typo-duplication from occurring:

  1. Deselect Script selected in Explorer when double clicking/opening script
    This would provide for a simple, easy fix that would be effective.
  2. Confirmation OR ignoring when doing CTRL + D when duplicating scripts
    Best solution in my opinion.
  3. I change the hotkey for CTRL + D myself in studio settings or unmap the keybind
    (making this thread not needed, but this thread was created because I feel like something better can be done if other people are making the same mistake I am)
5 Likes