Translate all of an Object's Properties to an Array

I need a function that I can call that will return an array of the current object’s property names (as indexes) and property values (as values).

With the array, I want to be able to read values just like I could with reading the object itself.
For example, assuming we name the array oldproperties, game.Workspace.Part["Transparency"] should return the same as oldproperties["Transparency"].

Does anyone have an idea of how I could accomplish this?

1 Like

I believe what you are looking for is an instance serializer. There is at least one of those on these devforums, you could just search and find some, maybe figure out how they work. or just click that link which will search it for you

3 Likes