Hey this is my first time ever working with a datastore and I want to know how you can change the value of something from another script? I am trying to make it so in my round system when a player finishes the game it will add 1 to the players data (gamesplayed, [number])
You can use the datastore across different scripts. Also whatβre you changing? A variable or an instance value
Number value
ββββββββββββββββββββ-
Whatβs preventing you from accessing and changing the number value directly? Are these two scripts server scripts?
Data is uploaded and downloaded. The downloaded data has to be stored somewhere. Most games will use session tables that are manually replicated or given a facet for querying by the client. There are more elementary methods that involve value instances stored under a clientβs Player instance. Both provide opportunities for communal access.
Value instances are easy enough to read and write to from any location. Session tables are usually managed by a ModuleScript which scripts import and request access to the session data
Like what do I use? Updateaysnc()?
Itβs not recommended that you write to the data-store each time you want to update player-data. That is why session tables and value instances exist
I used a session table so when do something it gets saved to the table and then when they leave the table gets added to the datastore
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.