Points System Issue

ohhh, I just reread the thread. For some reason I thought you were using DataStore2 :joy: ignore my first post.


Anyway glad you got the answer, and expanding on what sorify said

You should always read and write data to a proxy (a table or ValueBase) because of two huge bugs that can occur.

  • Surpassing the Datastore call budget, if you call to a Datastore too many times the requests will get queued and then dropped resulting in data loss. (big problem)
  • Race condition bugs, where some code reads from a Datastore after the Datastore should be changed but since it’s an Async call it hasn’t been changed yet. This can be very problematic since players can exploit this (or it can happen by mistake) to duplicate money/items. (big problem)

Loleris has a good module for streamlining data saving called ProfileService

You are still allowed to push to the datastore after an action happens (you may need to do this in server wide messages or global leaderboards) But you should never read and write values directly to the Datastore.

Anyway good luck!

1 Like