Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I handle writing data to DataStore?

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?

1 comment

0

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.

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.