So I was making a script that would save an entire folder value and convert it to a table when a player leaves but when I try to play the game it breaks and doesn't save? Explanation and is there a possible fix to it? (A script that could keep the server up for 1 second or over when a player leaves would be accepted)
OnClose
should do the trick.
-- there's a limit to how long this can yield. Information might be on the wiki, idk game.OnClose = function() wait(5) end