Please do not get confused with the title, this does not have to do anything with Data Stores (yet)
I have a building system where whenever the client places a brick, the client sends that brick data to the server, however I am unable to decide how to save their data temporarily on the server before saving the placed bricks’ data to the DataStore.
I’ve came up with two methods:
Method 1 - Data Stored in Server Script Variables
Whenever the client places a brick, the data gets sent to the server, and the server keeps individual client data in a table on the server script.
local PlacementData = {
Player1 = {
Brick1 = {
Position = "X,Y,Z",
Size = "X,Y,Z",
Orientation = "Y",
Color = "Reallyred",
Material = Enum.Material.Brick;
},
Brick2 = {
Position = "X,Y,Z",
Size = "X,Y,Z",
Orientation = "Y",
Color = "Reallyred",
Material = Enum.Material.Brick;
}
},
Player2 = {
Brick1 = {
Position = "X,Y,Z",
Size = "X,Y,Z",
Orientation = "Y",
Color = "Reallyred",
Material = Enum.Material.Brick;
}
}
}
Method 2 - Data Stored in Server Storage
Whenever the client places a brick, the data gets sent to the server, and the server makes a folder in Server Storage to each individual client with corresponding placement data.
Usability wise, the table with variables would be easier to save to a data store.