Trying to understand what's causing this error on Roblox's Dialogue plugin

So I’m using Official Roblox Dialogue System and Dialogue Editor Beta - and it works great on every other place.

But my current game runs into this error

Not sure what’s causing it.

Tried reinstalling the scripts? There’s an option to do that in the plugin toolbar.

This will occur if you are changing the parent of an instance that :Destroy() has be called on.

local a = Instance.new('Part') 
a.Parent = workspace 
a:Destroy() 
a.Parent = workspace -- error
1 Like

When the plugin was made, there was no way to preserve BillboardGuis on death, so instead it temporarily de-parents them on the Died event to prevent cleanup on death, and then re-parents them when the character respawns. When you call LoadCharacter, it never gets a chance to do this, and the BillboardGuis get destroyed, causing this error when it tries to set their parent again on spawn.

To fix this, Roblox has now added a ResetOnSpawn property to BillboardGuis, so you can edit to initialize that to false in created BillboardGuis, and remove the code that de/re-parents them. Maybe @Davidii can update the plugin with this as well.

2 Likes

Thanks for the explanation.