https://create.roblox.com/docs/reference/engine/classes/Plugin#Unloading
According to the docs, Plugin.Unloading
should detect when the place closes - but by my testing this is false.
Create a local plugin with the following code:
plugin.Unloading:Connect(function()
local part = Instance.new("Part")
part.Name = "Unloading"
part.Parent = game.Workspace
end
On a Team Create place, when you close + reopen you’d expect a part called “Unloading” to exist in the Workspace, but there is not
Any other ways to detect in a plugin when studio is closing?