Hi there,
I was working on a plugin with @hya123456h and we needed to be able to grab properties of an object so I looked around and found this: Properties - Creator Marketplace (roblox.com)
This module utilized http Service by storing the information of all classes on a github.io page however with a plugin you would need to turn on http service and allow it to access this website so instead I converted it from json to a lua table and hard coded it into a module I understand this may stress your performance for script as there is over 2 thousand lines but if you don’t want to enable http service it is a good solution.
The module is found here: PropertiesM - Roblox
If you want a tutorial just say and if anything is missing from the table please list what it is.
I am confused on why someone would need to create a module to get the properties of an object? It is not hard at all and would just be easier to get a property like you normally do (Object.Name for example)
but if you wanted to save a folder of random objects with it’s data then you couldn’t just list one property you could instead get them the properties and loop through them then add to a table what they are.
I’m pretty sure it’s to get all of the properties of an object into an array since Roblox currently doesn’t have a Instance:GetProperties() method.
Still very simple to do with the code that @2jammers put above in this post. I understand it is not exactly the same but still the same concept with a few lines of code needed only.
To everyone confused about the purpose of this module, it’s actually very useful.
The point of this is to get the property names for a given object, which isn’t currently possible. For example, if I had a frame and I wanted to store it in a database as a number, string, or table, I would need to store all the properties of that frame to recreate it.
Hard coding dozens of properties for dozens of instances is a huge pain, so that’s where this module comes in.
Lots of different games and plugins have their own implementations of this. For example, Reclass and Instance to Lua use implementations of this same idea.
By unnamed object they mean any Instance.
There isn’t a reason to check if the value is an instance because the GetChildren method returns {Instance}. You can just do local array = folder:GetChildren().
I don’t understand how this code relates to the module. I think you might have misunderstood what it does. The most useful information it provides is basically an array of property names for a given instance.