Gladii
|
  |
| Joined: 10 Mar 2012 |
| Total Posts: 1713 |
|
|
| 05 Dec 2014 09:18 PM |
| if loaded == loaded:GetChildren():IsA("Hat") then |
|
|
| Report Abuse |
|
|
|
| 05 Dec 2014 09:19 PM |
for i, v in pairs(loaded:GetChildren()) do if v:IsA'Hat' then end end
|
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 05 Dec 2014 11:41 PM |
loaded == loaded:GetChildren():IsA("Hat") Im not sure what that is supposed to be
GetChildren() returns a table
so doing that is like saying
local tab = { workspace.Part0; workspace.Part1; workspace.Part2; }
tab:IsA("Hat") |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 06 Dec 2014 12:22 AM |
| Or you can take the metatable approach :) |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 06 Dec 2014 12:58 AM |
| I don't see how that would help anything more than looping through the list |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 06 Dec 2014 01:00 AM |
| Well it would still loop through the list, but you won't have to do it manually. |
|
|
| Report Abuse |
|
|