How would i store sales count of in-game item?

i would use it so i could figure out what players like best and maybe i could make a limited item system. thank y’all for any help :metal: i know how to make simple datastores for storing someones inventory for example, but this would require a different method. like i could store a single number value for a item’s sales count but if multiple servers are adding to the number at the same time i think it would cause problems

2 Likes

This documentation says that DataStores are consistent throughout games

If you want, I could find out more about this.

I apologize in advance of me being lazy.

3 Likes

I would personally use a Datastore module called Suphi’s Data Store Module. It utilizes different features that are very useful in scaled projects such as session-locking which should solve the issue you’re having.

If you have the time he has 3 videos explaining it, or you can just look at the documentation of it on his discord. This link explains some of the session-locking feature:

Suphi does a lot of great tutorials on advanced programming topics in Roblox. Hope this helps!

2 Likes

so far i’ve found a lot of info. i dont understand a lot of it but i think i will just use data stores. i’ve always used SetAsync() but i found there is a difference between SetAsync() and UpdateAsync() there are limits but i don’t think what i’m doing will go over them. there is also memory stores which are fast data accessible from all severs and they are good for things like cross server trading but the data auto deletes after no more than 30 days so i’m probably going to use UpdateAsync() with data store

1 Like

wait now i’m even more confused i just saw another post that said it has a cooldown of 6 seconds which means players can only buy items every 6 seconds which wont work but i didn’t find any mention of a cooldown on the official documentation ? i’m not sure. i’m gonna have to look more into this

1 Like