Why is the gui thinks "gui" isn't nil when gui was destroyed?

Imagine three dialogues being added to your head First, the first dialogue comes up. Then after 3 secs, it disappears and it won’t remove itself from the table.

1 Like

if you try to check for an instance that is not a valid member of another, it would return nil, if you destroy a GUI component so it doesn’t exist, referencing it should return nil

1 Like

As a result of making the stacks not collide each other, I had to use gui.Parent if it is parented to it’s origin parent.
Not a solution, change my mind.

It already does that, but it will keep on stacking up. In the table, it can’t think that the gui isn’t nil when it is destroyed.

Fixed problem. This should be good to go. The logs stack up on top.

:Destroy() does not cause an instance to become nil. This may become the case when the garbage collector happens upon it, but don’t rely on that behavior. Rather, :Destroy() causes the instance to effectively go to the garbage. It still exists, it is just in the garbage, until the GC finds it and deletes it. You should remove it from your table manually when you destroy it, you do not want garbage in your table :stuck_out_tongue:

An instance also does not know what tables it is in, it’s impossible for an instance to “remove itself from the table”.

Right, but it is already added to the new one.

What do you mean? It is already added? I can’t see how your code has a 3 second wait, or a Destroy, or anything like that. Please include the full code