Allow to completely abort the game while running

As a Roblox developer, it is currently too hard to abort a script while running.

In many cases, during game testing, I need to abort the script to prevent PlayerRemoving and BindToClose from running, since the Stop button executes both.
This is because normally data is saved in the DataStore in these functions and when aborting, I want ABSOLUTELY NOTHING to be processed at the exact moment I need to stop the script.

Currently, it is possible to abort the running project as follows:

  1. Enter a script
  2. Activate a breakpoint
  3. Execute something in the game that forces the script to go through that line with a breakpoint
  4. When the script stops at this breakpoint line, then I press the STOP button.

Only in the above case is it possible to REALLY ABORT the script.

If Roblox is able to address this issue, it would improve my development experience because This will make it much easier to interrupt a script, preventing unwanted further processing.

8 Likes

If you change your view to the server during runtime in studio, you are able to disable your script through the properties panel, which will prevent both the player removing and the bind to close events from running.

3 Likes

Is there any reason you cannot use RunService:IsStudio() to prevent those functions from being bound in playtesting?

2 Likes

In my game, whether in Studio or not, data is always saved in PlayerRemoving.
But depending on the situation, I need to stop the script immediately and prevent the data from being saved, so that I can debug the problem that occurred.
In this way, a button or some simple function to abort the script would be extremely useful.

1 Like