Non-Archivable objects close all scripts in same directory (even if they are archivable)

If I’m editing a script, hop into run mode to test it, and then go back into Edit mode, all scripts are closed – even ones that were open previous to the game being run

It happens in in-window play solo as well. It makes sense for scripts opened in play solo to close when you go back into edit mode because those weren’t the edit mode scripts you were editing, but the edit mode scripts shouldn’t close. Not when you go back into edit mode, and not when you leave edit mode to hop into play solo / run mode. It’s really convenient to be able to edit a script, hop into run mode, and the hop back out and continue to edit the script immediately. This has become somewhat of a bother recently because I have been working at the bottom of a script with a bunch of folds collapsed to make the script easier to work with, and every time I go in and out of run mode I have to re-open and re-fold the script.

Okay, I found out the real issue that was causing this. It’s non-archivable objects. If you have a non-archivable object in any given directory, it will close every single script open in the script editor when you return to edit mode, regardless of if they are archivable or not.

Repro:
In a new place, create two items in ServerScriptService: A script, and a folder. Leave them as they are. Open the script, hop into play solo with that script open (it doesn’t have to be visible in the main window – as long as its tab is open it’s fine), and then hop back into edit mode. The script’s tab is still there and the script is still open, correct? Now set the folder’s archivable property to false. That should have no effect on the script, but with the script still open, jump into play solo and then return back to edit mode. The script will close. This is really annoying.

Expected behavior:
All open scripts should still be open when you return to edit mode. Even if there is a non-archivable item in the same directory. Even if the script is non-archivable itself. Open scripts in the editor should always be open when you return.

Edit: This also happens with scripts parented to the CoreGui, even though Archivable is set to true, likely because the CoreGui behaves as if Archivable is set to false.

I just realized that there’s more to it than this. Scripts normally don’t close when you go back to play solo. The reason this was happening was because I have the script located in an abnormal location. I create an ArcHandles and a Handles object to store my plugins, and that script in the OP as you can tell is a plugin. Because it is located in game.LocalPlugins (an ArcHandles) it closes when you return to edit mode. It would be nice if this closing upon returning to run mode for Handles/ArcHandles didn’t happen. It only happens when they’re a direct child of game – if I have a script in a Handles in the workspace this doesn’t happen.

wait since when does studio have a dark theme :open_mouth:

You can customize that in settings ->> Studio

You can customize that in settings ->> Studio[/quote]

Not the editor, the bar at the top.

You have to edit the RobloxStudioRibbonRelease.xml in the studio folder.

Search for “<RibbonBar minimizeButton”. I’m not sure if they removed it or not on recent versions, but look for themeoptions = “false”. Change it to themeoptions = “true” (if you don’t see it, add it). Then every time you open up studio click this:

Here’s what my whole studio setup looks like just with some edits to the ribbon.xml:

Edited OP. Found true reason this was happening.

Pls fix :frowning:

Very aggravating when scripts close just because there’s a non-archivable object in the same directory / non-archivable scripts close even though they still exist.

I’ve tried putting a script and a non-archivable folder into ServerScriptStorage, then going into and out of play solo. It seems to work just fine. What OS are you using and have you tried this without any plugins?

I was able to reproduce it earlier, but I’m have trouble this time. After opening and closing scripts, fiddling with the archivable property and switching between solo I had 2 scripts (script1, script2), I have script 1 open, I go to solo, and then while in solo script1 tab is swapped with script2 which wasn’t opened. So many odd behaviors with script tabs, I just keep fiddling with scripts and new things happen.

Oops – looks like I misunderstood the bug. The following is on Windows 7 64 bit with no active plugins:

Create a non-archivable folder in ServerScriptService and parent a script to it. Open the script, play solo, and return. It will close.

Create two folders in the ServerScriptService. One should be archivable and the other one not. Create scripts “A” and “B” in the nonarchivable folder and create scripts “C” and “D” in the archivable folder. Open them all. Go into play solo and you’ll notice that the open scripts are “C”,“D”,“C”,“D” instead of “A”,“B”,“C”,“D”. Exit Play Solo and “C”/“D” close and only “A” and “B” remain open.

Well that’s awkward. Out of curiosity, why are you using nonarchivable folders? We’ll take a look though.

It’s a huge hassle to develop plugins with ROBLOX. Even with Hotswap which lets you test them without publishing them to the site and opening a new place each time you make a change, if you ever need to go make another change you have to insert your plugin through InsertService or navigate all the way to your InstalledPlugins folder, find its ID, and then insert it. To rectify that, I did this:

Whenever I want to edit them I just quickly hop into Plugins or LocalPlugins (plugins per-place), make the change, and disable/enable the script to reload the plugin. Since the normal plugins are synced across every place, I have the “Plugins” object set to non-Archivable and I just load the contents of the settings (which contains all of the plugins) each time I open a new place. I had to put Plugins in SoundService though because I was experiencing this bug previously.