thepizz
|
  |
| Joined: 05 Mar 2011 |
| Total Posts: 2612 |
|
|
| 09 May 2015 11:28 AM |
Is there anyway someone can get the properties of an object without needing an an exception for every single child?
For example, :GetChildren() would return all the children of an object in a table. Is there anything like that which would return a table or something with all an objects properties?
I understand that I can just go to object types and make a million tables all the objects, but I was wondering if I had a way around this. |
|
|
| Report Abuse |
|
|
Qorm
|
  |
| Joined: 25 Jul 2010 |
| Total Posts: 1650 |
|
|
| 09 May 2015 12:35 PM |
for o,p in pairs(game.Workspace:GetChildren()) do print(p.Name) end
is that what u meant |
|
|
| Report Abuse |
|
|
thepizz
|
  |
| Joined: 05 Mar 2011 |
| Total Posts: 2612 |
|
|
| 10 May 2015 05:49 PM |
No, I mean an objects properties
Like a way to get all the different properties of different objects without having to add a giant list of "if v:IsA("Part") then print(v.Name) print(v.Size) end" ect |
|
|
| Report Abuse |
|
|
notfruit
|
  |
| Joined: 21 Sep 2012 |
| Total Posts: 1386 |
|
|
| 10 May 2015 07:48 PM |
| I'm guessing roblox objects are just tables, so do a generic for loop (for key, value in ipairs(foo)) |
|
|
| Report Abuse |
|
|
morash
|
  |
| Joined: 22 May 2010 |
| Total Posts: 5834 |
|
|
| 10 May 2015 07:52 PM |
| Generic for loops don't work. |
|
|
| Report Abuse |
|
|
notfruit
|
  |
| Joined: 21 Sep 2012 |
| Total Posts: 1386 |
|
| |
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 10 May 2015 07:57 PM |
Roblox objects are userdatas not tables.
I script -~ chimmihc |
|
|
| Report Abuse |
|
|