So i need to save data using datastores, but i need to save something really important when the last player leaves the server,
so i stumbled upon this on the roblox wiki:
game.OnClose = function()
print 'Closing, waiting'
wait(3)
print 'Done'
end
The wiki says that "item" is depreciated and not to use it for new work, however, i'm confused by this. Are there any alternatives to this and if not, would this function still work?
Thanks.

1 comment
or #game.Players:GetChildern()