Desynchronized scripts inside Actors will crash Roblox if the script is destroyed

Reproduction Steps

1. Create an Actor in the Workspace
2. Add a Script (works with LocalScripts or different RunContext scripts too)
3. Add code that runs in parallel constantly, e.g.:

game:GetService("RunService").Heartbeat:ConnectParallel(function() end)
  1. Run the game
  2. Delete the script or the actor
  3. Roblox will crash

Expected Behavior

Roblox should not crash if a desynchronized script is destroyed.

Actual Behavior

Roblox crashes when a script that has desynchronized code is removed from the game.

Workaround

I have to explicitly signal to my script to synchronize before the actor is destroyed. However, if the model inside the actor falls off the world and is destroyed by Roblox, I cannot prevent the crash.

Issue Area: Engine
Issue Type: Crashing
Impact: High
Frequency: Often
Date First Experienced: 2022-09-01 00:09:00 (-04:00)
Date Last Experienced: 2022-09-02 00:09:00 (-04:00)

27 Likes

We’re having issues reproducing this. Could you attach a full level and also note which platform you have this issue on, and whether it’s reproducible in Studio?

Edit: nvm, we reproduced it.

3 Likes

The issue has been fixed, you can check that it no longer crashes.

1 Like