yoshiwars
|
  |
| Joined: 27 Jul 2009 |
| Total Posts: 216 |
|
|
| 23 Nov 2013 12:38 PM |
| I can't use its name so I want to call it by its ClassName how do I do this? |
|
|
| Report Abuse |
|
yoshiwars
|
  |
| Joined: 27 Jul 2009 |
| Total Posts: 216 |
|
| |
|
| 23 Nov 2013 12:46 PM |
Generally you will have to iterate through all objects in its parent and return the first object that matches the classname.
Example:
function get_object_by_classname(parent,class) for _,o in pairs(parent:GetChildren()) do if o:IsA(class) then return o end end end
|
|
|
| Report Abuse |
|