|
| 21 Feb 2016 10:51 AM |
How do you put Player Removing and this together?
#code if Developer == true then print('Developer') end |
|
|
| Report Abuse |
|
|
|
| 21 Feb 2016 10:52 AM |
game.OnClose = function() wait(5) end
That's all you need to do. They operate individually, you don't need to merge them.
|
|
|
| Report Abuse |
|
|
|
| 21 Feb 2016 10:53 AM |
Where does the SetAsync go in that?
#code if Developer == true then print('Developer') end |
|
|
| Report Abuse |
|
|
|
| 21 Feb 2016 10:54 AM |
It doesn't. This only holds the game open for five seconds to give time for you to save data in PlayerRemoving or something.
|
|
|
| Report Abuse |
|
|
Link5659
|
  |
| Joined: 04 Jun 2012 |
| Total Posts: 4525 |
|
| |
|
|
| 21 Feb 2016 10:57 AM |
So they go seperate, not combined? I'll give you my save, and can you write it correctly?
#code if Developer == true then print('Developer') end |
|
|
| Report Abuse |
|
|
|
| 21 Feb 2016 10:59 AM |
| Can you set game.OnClose in studio and have it save online? |
|
|
| Report Abuse |
|
|
|
| 21 Feb 2016 11:10 AM |
--THIS IS HOW I HAVE IT WRITTEN game.Players.PlayerRemoving:connect(function(player) if player:FindFirstChild("statnumbers") ~= nil then local Key = "user_"..player.userId local ValuesToSave = {player.statnumbers.xp.Value,player.statnumbers.Level.Value,player.statnumbers.Kills.Value,player.statnumbers.Deaths.Value,player.statnumbers.GhostKills.Value,player.statnumbers.DemonKills,player.statnumbers.Cilicoins.Value} DataStore:SetAsync(Key,ValuesToSave) end end) game.OnClose = function() wait(10) end
#code if Developer == true then print('Developer') end |
|
|
| Report Abuse |
|
|
|
| 21 Feb 2016 11:19 AM |
cmon, b1
#code if Developer == true then print('Developer') end |
|
|
| Report Abuse |
|
|