Data Store has been the toughest lua topic for me. I have tried many times but it has resulted in failure. I have heard that you could use Data Store with Strings and I have considered on creating a system that when you purchase a in-game hat only in a gui in that game it will save as a string and you will be able to have that hat in other games connected to that main one.
Can someone explain on how to use data store? What I can do with it? What can't I do with it? Examples?
Thank you in advance.
It is not half bad to do, it is just time consuming and you need to make sure you follow the formula for max requests of (60+10*The number of players). This is an example of a code needed.
game:GetService("DataStoreService"):GetDataStore("MyString"):SetAsync("String","This is an epic string") --Sets the "String" in "MyString"
print(game:GetService("DataStoreService"):GetDataStore("MyString"):GetAsync("String") ) --Gets the "String" in "MyString", prints "This is an epic string"
This can serve for epic data persistence be setting the GetDataStore to the person's name or userId (userId is recommeneded).