Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

Player removing is not working anymore???

Asked by
iRexBot 147
6 years ago

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

Log in to vote
1
Answered by
CootKitty 311 Moderation Voter
6 years ago
Edited 6 years ago

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
0
horrible answer iRexBot 147 — 6y
0
/\ ignore that iRexBot 147 — 6y
0
tf kind of answer is this BerrySus 65 — 6y
0
@ben20isgoo it works! It can delay the game shutdown time. Very useful iRexBot 147 — 6y
View all comments (2 more)
0
OnClose is deprecated so I was redirected to this page: http://wiki.roblox.com/index.php?title=API:Class/DataModel/BindToClose iRexBot 147 — 6y
0
Oh, sorry. Yeah, you should use BindToClose then. CootKitty 311 — 6y
Ad

Answer this question