rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
|
| 28 Sep 2015 05:56 PM |
how would i tell if something i get is a property, and not a child of an instance for example, I do object.Transparency, and object is a part, it would return the property, but if I did it on like a boolvalue, and i had another object under it named "Transparency", it would return the object named "Transparency". How would i tell the difference?
Also, dont just say, "ray, u dumb just pcall() :IsA() or something" some properties return an object
Red Blossoms |
|
|
| Report Abuse |
|
|
tbnj123
|
  |
| Joined: 29 Oct 2010 |
| Total Posts: 443 |
|
|
| 28 Sep 2015 05:57 PM |
| do a loop of the children n check if it's there lol... |
|
|
| Report Abuse |
|
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
| |
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
|
| 28 Sep 2015 05:58 PM |
wait i cant do that it's a super secret reason it'll cause a recursion and poop on me
Red Blossoms |
|
|
| Report Abuse |
|
|
|
| 28 Sep 2015 05:59 PM |
>Pcall >check for class name >if error it's a property, else an object |
|
|
| Report Abuse |
|
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
|
| 28 Sep 2015 06:00 PM |
but if the property returns an object, it'll pass
Red Blossoms |
|
|
| Report Abuse |
|
|
Argelius
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 4047 |
|
|
| 28 Sep 2015 06:01 PM |
| what, like the Adornee property? |
|
|
| Report Abuse |
|
|
|
| 28 Sep 2015 06:01 PM |
| Why're you naming your objects as property names to begin with. |
|
|
| Report Abuse |
|
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
|
| 28 Sep 2015 06:02 PM |
mouse.Target for example
returns a basepart (assuming that it doesnt hover over skybox) pcall(function() return mouse.Target.ClassName end) it worx
Red Blossoms |
|
|
| Report Abuse |
|
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
|
| 28 Sep 2015 06:02 PM |
and it's not because im doing it, it's so i can account for all situations
Red Blossoms |
|
|
| Report Abuse |
|
|
Zakusa
|
  |
| Joined: 16 Feb 2013 |
| Total Posts: 359 |
|
| |
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
|
| 28 Sep 2015 06:04 PM |
happy batman day 2 u 2
i think i can use findfirstchild maybe
Red Blossoms |
|
|
| Report Abuse |
|
|
|
| 28 Sep 2015 06:04 PM |
| Batman day was two days ago >:c |
|
|
| Report Abuse |
|
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
|
| 28 Sep 2015 06:05 PM |
it's always batman day
Red Blossoms |
|
|
| Report Abuse |
|
|
|
| 28 Sep 2015 06:21 PM |
if type(SOMETHING) == 'number' then
end |
|
|
| Report Abuse |
|
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
| |
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 28 Sep 2015 06:57 PM |
| did nobody seriously mention FindFirstChild |
|
|
| Report Abuse |
|
|
lordrambo
|
  |
| Joined: 16 Jun 2009 |
| Total Posts: 20628 |
|
|
| 28 Sep 2015 06:58 PM |
"i think i can use findfirstchild maybe" NOPE NO ONE AT ALL |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|