Saving a table using DataStore2

Hello @speeddecoolste

First of all,

DS2 uses default datastores, just in another way. You can read this to know exactly how.
And your DS2 code seems good, I would use a table instead of serverstorage to save the data though. More organized and easier to access data. However I notice a memory leak in your code. You are not removing the data of the player after they leave, if a player keeps rejoining or just a lot of players join and leave, there will be a stack of useless data in your server storage which will keep increasing over time. Everything else seems good to me (except stuff other people have already pointed out) :slight_smile:.

3 Likes