The title explains it. Tried looking for other topics like this. Couldnt find any. If you know please answer!
Thanks!
The title explains it. Tried looking for other topics like this. Couldnt find any. If you know please answer!
Thanks!
I am not actually sure if this is possible.
Unfortunately there is no way to do this as of right now although it would be a great feature. Correct me if I’m wrong.
You would have to write all of the properties out yourself for each class, although you can save yourself some headache thanks to inheritance.
So an example would be, instead of having the ALL the properties for the Part
class, we can just use the ones specific to Part
in its own table. Then, have a separate BasePart
class which would cover not only Parts
, but also UnionOperations
, MeshParts
, WedgeParts
, etc.
local BasePart = {
"Anchored";
"AssemblyAngularVelocity";
"AssemblyCenterOfMass";
... --the rest of the properties for BasePart
}
local Part = {
"Shape" --part only has one specific property
}
local function _propprint(Instance: Instance, ClassTable: {})
for _, Property in ClassTable do
print(Property.." = "..tostring(Instance[Property]))
end
end
function PrintInstanceProperties(Instance: Instance)
local PropertiesTable = {}
if Instance:IsA("Part") then
--print both the part properties and basepart properties
_propprint(Instance, BasePart)
_propprint(Instance, Part)
end
end
local MyInstance = (...)
PrintInstanceProperties(MyInstance)
I might make a module for this actually; sounds tedious but kinda fun.
I just realized that you could probably make a webscraper for the roblox doc pages and have a python script or something automatically dump all the properties into a file but that might be taking it a bit far.
is there any specific property you want to view?
there could be a way to do it for that property but not all
something that might prove useful is MaximumADHD’s API dump
you can use HttpService:GetAsync() and HttpService:JSONDecode()
i have a script that does this to get all properties. I’ll send it later
sadly phones don’t have roblox studio
alr, i have a code now.
local httpService = game:GetService("HttpService")
local apiDump = httpService:GetAsync("https://raw.githubusercontent.co".."m/MaximumADHD/Roblox-Client-Tracker/roblox/API-Dump.json")
-- you may have noticed that the link is seperated. that's because of a weird thing that makes me *always* get an error 403 when i try posting with the full link
local classProperties = {}
do
local classNames = {}
for _, class in httpService:JSONDecode(apiDump).Classes do
classNames[class.Name] = class
end
local function indexClass(class, name)
for _, member in class.Members do
if
member.MemberType == "Property" -- make sure it's a property
and member.Security.Read == "None"
and (not member.Tags or (not table.find(member.Tags, "NotScriptable") and not table.find(member.Tags, "ReadOnly"))) -- If you want to see read-only properties too, remove the `and not table.find(member.Tags, "ReadOnly")`
then
table.insert(classProperties[name], member.Name)
end
end
if class.Superclass ~= "<<<ROOT>>>" then
indexClass(classNames[class.Superclass], name)
end
end
for name, class in classNames do
if class.Tags and table.find(class.Tags, "NotCreatable") then continue end -- don't add classes you cannot create with Instance.new.
classProperties[class.Name] = {}
indexClass(class, name)
end
end
--[[
now, if you want all properties of an object's class
you just do classProperties[object.ClassName]
and then you get an array of just property names.
note that the table will also contain hidden properties and properties that only the client can access
]]
Well I know that, like .Size or .CFrame etc.