Data Store for Client Sided Values

So, I need a datastore which will save the value of a part in a folder, where the value can only be changed client-sided. Preferably a datastore which saves through table values, where each part is added to a table.
The issue is, I have got no idea how, tried chat gpt and nothing worked.

I have no idea if this makes any sense BUT I think its possible

1 Like

Im not quite sure what exactly you are trying to save, since you cant save instances. If you only want to save a position of parts you can just loop though the folder with all the parts, put their position in a table, then use a RemoteEvent to send the table to the server so it can be saved there.

1 Like

Not entirely sure what you mean, however you can use a remote event to pass client data to the server like so:

-- Local Script
local remoteEvent = game.ReplicatedStorage.RemoteEvent
local table = {}

remoteEvent:FireServer(table)
-- Server Script
local remoteEvent = game.ReplicatedStorage.RemoteEvent

function getTable(player, table)
-- code here
end

remoteEvent.OnServerEvent:Connect(getTable)
1 Like

Context of the game; you equip a tool and when you click a part the part dissapears and a bool value in the part becomes true. I need to save that bool value when its only true on client

This is not a Good Idea.

Just have the relevent Data on the Server. And then Save it, Client Sided DataStores are very easily exploitable.

1 Like