generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: simple question about playerremoving

Previous Thread :: Next Thread 
cloakedyoshi is not online. cloakedyoshi
Joined: 15 Jul 2009
Total Posts: 18321
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
cloakedyoshi is not online. cloakedyoshi
Joined: 15 Jul 2009
Total Posts: 18321
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
expoundings is online. expoundings
Joined: 02 Feb 2013
Total Posts: 2359
18 Jun 2016 02:33 AM
just do it on a server so you don't have to use an event


Report Abuse
cloakedyoshi is not online. cloakedyoshi
Joined: 15 Jul 2009
Total Posts: 18321
18 Jun 2016 02:37 AM
so it's not resource intensive if i have it constantly saving all player data?
Report Abuse
expoundings is online. expoundings
Joined: 02 Feb 2013
Total Posts: 2359
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
cloakedyoshi is not online. cloakedyoshi
Joined: 15 Jul 2009
Total Posts: 18321
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image