How can/should manage object data?

  1. What do you want to achieve?
    A build mode system that you can recolor objects and purchase and sell.
  2. What is the issue?
    I am having trouble figuring out a good way to manage data for the objects. This data would be things like defaultColor, currentColor, price and some others.
  3. What solutions have you tried so far?
    DevHub couldn’t help and attributes got way to complicated.
local setPartData = function(part, data)
   for attribute, value in pairs(data) do
      part[data] = value
   end
end

-- Example

setPartData(workspace.Part, {Size = Vector3.new(1, 2, 1), Position = Vector3.new(0, 10, 0)}) -- Would set the position and size of that part, but you can change it to whatever you want

I hope this is what you were looking for!

The issue is that there will be different objects and that would be somewhat inefficient.