Closed boeljoet closed 3 years ago
You're not using DataStore2 correctly. Reread the documentation.
in this instance i have no choice. the pet folder is wildly updating, adding and removing pets. and ill have to keep track of all the connections being made and disconnect them to keep the server clean. either that or turn the entire pet system to datastore 2 which is more work.
i was hoping on a quick solution.
thank you for the reply ^^ i do know how to continue tho :D
the pet folder is wildly updating, adding and removing pets.
Your code updates, adds, and removes pets. Update DataStore2 at the same time you're doing that.
i have a couple of folders with content that i want to save. i tryed
and it is not saving
i checked the order in wich datastore2 works. it does run the set command before the save.
tryed the BeforeSave(modifier: (dataValue: any) => any). same issue.
both test are in game (not in studio)
if i test it in studio… it somewhow does works
(i posted this on roblox as well https://devforum.roblox.com/t/datastore2-set-when-player-is-leaving/1364769)