generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Is there a more efficient method of doing this?

Previous Thread :: Next Thread 
Aaaboy97 is not online. Aaaboy97
Joined: 05 Apr 2009
Total Posts: 6612
10 Mar 2012 11:05 AM
I'm trying to find the most efficient way to tell if `a` is a ROBLOX object, this is what I have.

    select(2, pcall(a.IsA, a, "<<<​ROOT>>>"))

is there a more efficient method of doing this?
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
10 Mar 2012 11:20 AM
[ Content Deleted ]
Report Abuse
trappingnoobs is not online. trappingnoobs
Joined: 05 Oct 2008
Total Posts: 19100
10 Mar 2012 11:23 AM
he wants to know if it's a roblox Instance like a Part or summit
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
10 Mar 2012 11:28 AM
[ Content Deleted ]
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
10 Mar 2012 11:33 AM
All the roblox objects are userdata.. right?

So couldn't it just be;

userdata = type(object)=="userdata"

?
Report Abuse
belial52 is not online. belial52
Joined: 10 Oct 2009
Total Posts: 8074
10 Mar 2012 11:35 AM
@su, Using newporoxy can create a userdata too.
Report Abuse
KingBoo is not online. KingBoo
Joined: 16 Jul 2007
Total Posts: 8495
10 Mar 2012 01:21 PM
IsA("Instance") ?
Report Abuse
trappingnoobs is not online. trappingnoobs
Joined: 05 Oct 2008
Total Posts: 19100
10 Mar 2012 01:53 PM
What about

if Workspace.IsA(object, "Instance") then
Report Abuse
owen0202 is not online. owen0202
Joined: 27 Feb 2008
Total Posts: 6912
10 Mar 2012 01:58 PM
Scratching my head and thinking of a scenario where a roblox object isn't a roblox objec.t
Report Abuse
popinman322 is not online. popinman322
Joined: 04 Mar 2009
Total Posts: 5184
10 Mar 2012 02:13 PM
select(2, pcall(a.IsA, a, "<<<​ROOT>>>")) and a.IsA == Workspace.IsA

~+[CROOKITY BANDED SNAKES]+~
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image