Can someone help me set up DataStore2?

Hello, I was trying to set up a datastore2 for:

  1. Min(Int)
  2. Job(String)
  3. Class(String)
  4. Weapon License(String)

The Min should increase by 1 each minute the player is in the game.
I’ll take care for the rest, But could you show me how do I make it save them?

Can someone help me, please?
Ty!

here just a simple search didnt hurt me

1 Like

I do encourage you to actually try attempting this problem yourself first before asking for help. There is documentation and a basic use example available on the documentation page that can teach you how to create stores and save data with DataStore2. In terms of minutes, that’s a separate problem that you can resolve by learning about loops or other methods of counting time (e.g. calculating the time between when they join and leave, then converting that time into minutes).

DataStore2 API. Use the Save function when you create a new DataStore2 if you want to control when to save data. You normally won’t have to explicitly save data yourself, just put new data - do that with the Set function.

local foobar = DataStore2("foobar", player)
foobar:Set("something")