the DescendantRemoving event will fire when simply closing a script
Source code
game.DescendantRemoving:Connect(function(descendant)
print(descendant:GetFullName())
end)
the DescendantRemoving event will fire when simply closing a script
Source code
game.DescendantRemoving:Connect(function(descendant)
print(descendant:GetFullName())
end)
Thanks for the report! I filed a ticket in our internal database.
Hi,
This is as designed, we will keep this behavior: it is caused by scripts being descendants of the game.
They aren’t exactly being removed, though, right? DescendantRemoving implies that the instance is being removed from the datamodel; which isn’t happening in this case? It would make sense if this was related to a ScriptDocument, which is removed upon closing the script editor, but doesn’t necessarily make much sense for the script itself? Unless scripts are destroyed and re-created upon the editor closing in-which in that case; that needs to be documented because that is odd.
You are correct. I’ll put in a feature request for this for you.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.