Official Dialouge breaks on LoadCharacter

The official Roblox dialogue deparents its BillboardGuis on character death and re-parents them to the PlayerGui when the player respawns to prevent them from being deleted, as the PlayerGui is cleared when players respawn. This works fine when the character dies, but Died never fires with LoadCharacter. The BillboardGuis are destroyed, locking their parents. When attempting to re-parent the destroyed billboard guis, the dialogue script breaks because the parents are locked:

repro.rbxl (72.8 KB)

  1. Spawn into Play Solo
  2. Reset, everything’s fine
  3. Use LoadCharacter in the command line and the dialogue script breaks

This is a really handy use case for LayerCollector.ResetOnSpawn, as there’d be no need to hack around Roblox’s PlayerGui reset in the first place.

1 Like