|
| 18 Jun 2016 02:20 AM |
would using this: http://wiki.roblox.com/index.php?title=API:Class/Players/PlayerRemoving
in a localscript work? namely if i want to save stats with FE? |
|
|
| Report Abuse |
|
|
|
| 18 Jun 2016 02:22 AM |
for instance something like:
game.Players.PlayerRemoving:connect(function(player) blahblahfireevent() end)
would it register in time? |
|
|
| Report Abuse |
|
|
|
| 18 Jun 2016 02:33 AM |
just do it on a server so you don't have to use an event
|
|
|
| Report Abuse |
|
|
|
| 18 Jun 2016 02:37 AM |
| so it's not resource intensive if i have it constantly saving all player data? |
|
|
| Report Abuse |
|
|
|
| 18 Jun 2016 02:40 AM |
i usually only save player data on playerremoving and load it when they enter and i handle it serverside, for example the data system for my mining game i'm making:
player enters, server sets up its own copy of that player's data and gives the data to the client to do stuff with, like to set up the client's inventory
when a player mines an ore, it fires the server telling it the ore, then the server adds that ore to the server's copy of that player's data(doesn't update the datastore) then returns the new data to the client for it to be updated on the client
when the player leaves, whatever data for that client is stored on the server is saved to the datastore
|
|
|
| Report Abuse |
|
|
|
| 18 Jun 2016 02:52 AM |
*facedesk*
that would be a lot easier and less-intensive than how i've been handling it
thanks for the better way to handle it |
|
|
| Report Abuse |
|
|