Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Player removing is not working anymore???

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)

1 answer

✓ Accepted answer

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

6 comments

0

horrible answer

0

/\ ignore that

0

tf kind of answer is this

0

@ben20isgoo it works! It can delay the game shutdown time. Very useful

0

OnClose is deprecated so I was redirected to this page: http://wiki.roblox.com/index.php?title=API:Class/DataModel/BindToClose

0

Oh, sorry. Yeah, you should use BindToClose then.

This discussion is preserved as it was. New answers, comments, and votes are closed.