How could I make a player market?

Hey devs!

How could I go about making a market where players can sell their items or buy items from other players who have put items up for sale, (also should work after they leave the game, I assume I’m going to have to use data stores).

Whats the best way to go about doing this?

Any help appreciated!

Anyone know how I can do this, perhaps link some resources/tutorials?

I mean I don’t have experience with this specifically, but I would assume you should use datastores, just make sure each item has some sort of unique identifier that way nothing gets duplicated or deleted from a glitch.

Most likely using by Datastores like the last person said, you could check out ProfileService

1 Like

Did you ever get it figured out? Im trying to make the same thing but cant figure it out

Use 2 datastores:

  1. The player datastore, that the unique identifiers of the items the player made
  2. The market datastore, that has the actual items data. For that you need to use some sort of pagination due to the maximum key limit(4MB). Together with compression you should be able to make these pages really big like 1K items each, and for each page you use a different key(that can be the page number). The issue is that when a client tries to edit/upload an item, they should have the most updated version of the list. So you must add a feature in your system where two clients aren’t allowed to make a market upload/edit at once for the same page. So the bigger the number of items per page you chose, the less frequent said requests must be.

I haven’t found a datastore system for the second example, perhaps someone will make one some day. I find myself looking for “non-player related datastores” at times.