How can I make a shop system?

How would you make unlocked and locked items system?, I have thought about making a table inside the server then sending it onto the client.I just don’t know how I can make it work. Does anyone have ideas?

This is what I have so far

2 Likes

Maybe have two tables that holds locked items and unlocked items, and then just send them to the client with a remote event? For buying items, do that on the server with a remote function.

I’ve recently been working on a system myself. For my system, I have a module in replicated storage named “Items.” Then I insert modules into the Items module and list the information there. For example…

local item = {
    name = "Item", --The name of the item
    itemId = 1, --The item id to save, in case you change the name
    imageId = "rbxassetid://123456", --The image id for the client
    description = "This is your first item!", --The description
    cost = 50, --The cost of the item
}

This is accessible by both the client and the server. First, I load all the items on the client. Then, when the client receives data from the server. Make the items that are purchased visible or vice versa.

1 Like

If its accessible by the client and the server, doesnt that mean the client can edit stuff there?

They could, but it wouldn’t be seen by the server. For example, if the client did

item.cost = 0

The server would still see it as 50, and not 0. That’s the beauty of filtering enabled. :slight_smile:

2 Likes

I fixed the issue, instead of using a table im using bool values

1 Like