Reload all (module)scripts

As a Roblox developer, it is currently difficult to design modulescripts while actively testing them. We have the ability to reload a single modulescript (which only reloads at identity 0/2, useless when creating modulescripts for plugins), but we have to have the modulescript open and afterwards reload all modules/scripts that require that module and any requiring those…

Actual feature request: A button (“somewhere”, doesn’t have to be immediatly visible, e.g. like “Open Previous Tab”) that when activated clears the modulecache for all identities. Basically reload (or at least clear the cache of) all (previously run) modulescripts across all identities.
Extra: Reload all regular (local)scripts too. Not really needed, but might be a nice bonus (maybe as an extra button)

This would allow us to activate it, reload the script that requires a module (which requires modules itself) and it would seem as if the modules have never run before.

If it’s a “button” like Play, Reload Script, … we can link a shortcut we want and/or add it to the Quick Access Bar. This would help a lot with scripting with modulescripts that require a lot of testing.

8 Likes

Would live plugin loading fix the need for this? That’s the only use case I’ve ever had for wanting to reload modulescripts.

When developing the animation editor I made a custom studio build to allow live-loading of plugins and it was a lifesaver.

2 Likes

Live plugin loading? Eh, this feature would help with plugin development as it’d reload modulescript for plugin identities too, but that’s more like a bonus. Does sound interesting though.

I’m currently working on some module loader stuff (for regular scripts), where I have the need to reload (all) modules quickly. Stopping and running the game time and time again is a bit slow and annoying.

EDIT: To stop it from affecting all modulescripts, including for regular plugins, it might be best if the Reload all only works on modules that are a descendant of the DataModel

1 Like

Why are you needing to reload ModuleScripts? Are you editing them in play solo? If so, why aren’t you hopping back into edit mode to make the chances and then back into play solo?

1 Like

That sounds like a really niche use case so the likelihood of this being implemented any time soon (if at all) isn’t likely. The purpose of Test mode is to Test the game. A secondary Test mode inside Test mode sounds weird.

So, your solution here is pretty much to clone the modulescript which (unless it’s changed) will load it as a new module.

1 Like

The only use case I see here is plugin development. Which is already easy, just do require(script:Clone()).

3 Likes

Currently hopping back and forth is indeed what I have to do. I feel like that step of having to basically rerun the whole place seems a bit unnecessary. (I can edit the scripts in play solo before stopping/running since script modifications are kept since some months)

The mechanic behind the current Reload script button. It clears the cached return value (or error) of a modulescript and runs it again. That “clear cache” part, it’d be nice if I could instantly do that for all modulescripts in the DataModel.

I’m also using the tagging beta (CollectionService) with modulescripts being tagged. Performing on a clone (which I did in the past) is a nice workaround, but doesn’t work here. (CollectionService returns the originals in the DataModel)

1 Like

Unrelated to the feature request, but

Did this make it into production? I’ve been using the “Save as Local Plugin” option, and I just noticed whenever I save a plugin that way, it reloads all plugins in studio (without having to reopen the place or do anything else)

1 Like

Nope I never shipped it, it was just a hack for my build.

1 Like