I recently ran into a need to get the properties of an instance, and discovered that Roblox surprisingly hasn’t made this a feature yet.
The :GetProperties() feature would make it much easier for me to put together my project. Additionally, I’d love if the returned values also specified which category each property is under.
I decided to lua-ify the properties window, as well as make some minor improvements. Currently, I am creating a large ModuleScript filled with all the possible properties of each class, listed underneath the category they belong to.
Example of the property table I had to manually create for the "Part" class
["Part"] = {
["Appearance"] = {
"BrickColor",
"CastShadow",
"Color",
"Material",
"Reflectance",
"Transparency"
},
["Data"] = {
"CenterOfMass",
"ClassName",
"Mass",
"Name",
"Orientation",
"Parent",
"Position",
"CFrame",
"RotVelocity",
"Velocity"
},
["Behavior"] = {
"Anchored",
"Archivable",
"CanCollide",
"CollisionGroupId",
"Locked",
"Massless",
"ResizeableFaces",
"ResizeIncrement"
},
["Part"] = {
--"CustomPhysicalProperties",
"RootPriority",
"Shape",
"Size"
},
["Surface"] = {
"BackSurface",
"BottomSurface",
"FrontSurface",
"LeftSurface",
"RightSurface",
"TopSurface"
}
}
If the returned table was similar to the one I created for each class, it would be extremely helpful to me personally. (and I’m sure it’d be helpful for others as well)
I could have used a HTTP request to a site that returns all the properties of an Instance, and that’s what I used for a little bit. However, I ran into the issue of it not telling me what category the property was under, therefore my property window was just a long list of every property with no organization.