Personally, if I were to attempt to upload the properties of an Instance, I would create a array of each property I wish to iterate through, and create a function to return a dictionary of each value for upload to our DataStore
local DataStoreService = game:GetService("DataStoreService")
local PropertyData = DataStoreService:GetDataStore("Properties")
local Player = game:GetService("Players”).LocalPlayer
local PartProperties = {
"BrickColor", "Material", "Name"
}
local Part = workspace.Part
function GetPartProperties(Part)
if not (Part) then return end
local Properties = {}
for _,Property in pairs(PartProperties) do
Properties[Property] = Part[Property]
end
return Properties
end
PropertyData:SetAsync(Player.UserId.."Properties", GetPartProperties(Part))
This is not the full answer, this does most of the lifting either way. The rest of the code is left to you to try!