So I know why you use Datastore2.Combine(), but if I do that in my main saving script, do I need to do that in my buy item script too?
Also would I just be better off putting the buy item script in the saving script itself?
Thanks!
So I know why you use Datastore2.Combine(), but if I do that in my main saving script, do I need to do that in my buy item script too?
Also would I just be better off putting the buy item script in the saving script itself?
Thanks!
You should only use DataStore2.Combine() once.
Also DataStore2 saves data for you automatically when a player leaves or server closes, so you can just use the Store:Set(newvalue) or Store:Increment in the buy item script.
Thanks!
About the buying script, theres a slight issue that I posted about in this topic.
So I think I will need to add the item to the Datastore2 table, and add the tool to the Tools folder in the buy script itself.
If you figure out how I could use the OnUpdate function to add tools to the Tool folder, let me know!