Save Items in Table

Hello,

I want to save all the items in this folder globally.

image

This means it will be there on every single server, no matter what.

  1. How would I do this, and
  2. Is ReplicatedStorage a good place to put it?

Thanks,
1st_Prin

You would need to use datastores to store the stuff in the folder.
Is it going to be accessed by local scripts? Because if it isn’t needed by the client you could put it in server storage

In the Replicated Storage, both the server and clients can access it, so If that’s want you want then leave it there. If you want only the server to have access to it then you can put it in server storage.

I moved the folder to ServerStorage. The client does not need it. But how would I make the DataStore script?

Do you want to save both the folder and value, or only the value’s value?

I would like to save the value. But more values will be added while the player is playing the game, so I want to save those too.

Ok, so use the Player Removing event to detect when they leave so you can Set Async (save it), and then whenever they join the game, use the player added event to Get Async (which will load back the data).

Make a table, get the descendants of that folder and save the different values in that folder. But take note that you can only save strings and numbers.

1 Like