If I can change user's value only every 6 seconds, what is the best way to handle this when I'm making a shooter game for example, and the player kills more than 1 person within less than 6 seconds? Should I make a separate loop on another thread and every >6 seconds save the data for all the players or is there a better way?
✓ ANSWER ACCEPTED
How do I handle writing data to DataStore?
1 answer
✓ Accepted answer
Type in the LocalPlayer value (and put it into a variable with the character property). When that player dies, Make a function that stores a DataStore. Then That DataStore needs to be saved at the right time, Like when a player leaves.
2 comments
0
Oh, thanks! Weird that I didn't think about it. Looks like it's the best way, just save the data when player leaves.
0
Glad I could help!
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Maybe you could try and store that information until it is possible to save it? There should be a better way, but I don't know a lot about these kind of stuff.