I need to save data when the server closes, such as when the test is stopped in Studio or when the last user leaves the Overdare game. However, the server currently closes while saving, so the data is not saved properly.
I would like something like game:BindToClose() to be added so that cleanup finishes before the server closes.
Example:
function OnServerClose()
– Save data, etc.
end
game:BindToClose(OnServerClose)