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 » Scripting Helpers
Home Search
 

Re: What's the point of IsA when you have ClassName?

Previous Thread :: Next Thread 
Demystified is not online. Demystified
Joined: 05 Nov 2007
Total Posts: 6580
24 Apr 2014 04:36 PM
?
Report Abuse
SenseiWarrior is not online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
24 Apr 2014 04:37 PM
:IsA() is way better. You can use hit.Parent:IsA("Character") to check if a character touched a brick.
Report Abuse
COOLDUDE11OO is not online. COOLDUDE11OO
Joined: 21 Aug 2011
Total Posts: 5115
24 Apr 2014 04:37 PM
IsA is just faster.

This is this same thing:

if script.Parent:IsA("ClassNameHere") then
end

if script.Parent.className == ("ClassNameHere") then
end
Report Abuse
Demystified is not online. Demystified
Joined: 05 Nov 2007
Total Posts: 6580
24 Apr 2014 04:39 PM
Also, why isn't waitForChild() a BIF?
Report Abuse
Spongocardo is not online. Spongocardo
Joined: 06 Sep 2008
Total Posts: 2843
24 Apr 2014 04:40 PM
What is a BIF?

Here's my siggy... Done.
Report Abuse
jewelycat is not online. jewelycat
Joined: 10 Sep 2008
Total Posts: 17345
24 Apr 2014 04:40 PM
IsA allows superclasses....

instance:IsA("BasePart")
checks for ClassNames of Part, WedgePart, Truss, etc.
Report Abuse
Demystified is not online. Demystified
Joined: 05 Nov 2007
Total Posts: 6580
24 Apr 2014 04:43 PM
@spong

built in function
Report Abuse
Spongocardo is not online. Spongocardo
Joined: 06 Sep 2008
Total Posts: 2843
24 Apr 2014 04:44 PM
@Demyst Oh right.

Here's my siggy... Done.
Report Abuse
Demystified is not online. Demystified
Joined: 05 Nov 2007
Total Posts: 6580
24 Apr 2014 04:45 PM
is BIF a legit acronym or is it just something i made up

4getting
Report Abuse
Spongocardo is not online. Spongocardo
Joined: 06 Sep 2008
Total Posts: 2843
24 Apr 2014 04:47 PM
I think it's something you've made up, I've never heard that used before. xD

Here's my siggy... Done.
Report Abuse
Demystified is not online. Demystified
Joined: 05 Nov 2007
Total Posts: 6580
24 Apr 2014 04:47 PM
probably

anyway

why isn't it :(
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
24 Apr 2014 04:49 PM
becuz
people edit stuff ingame sumtimes
and players join
so you wait
fewl
loel
dunt know actuly
gud idea m8
Report Abuse
Demystified is not online. Demystified
Joined: 05 Nov 2007
Total Posts: 6580
24 Apr 2014 04:51 PM
I don't know if I'm being stupid and there's some technical thing, but I see waitforchild in so many scripts I look at.
Report Abuse
12packkid is not online. 12packkid
Joined: 24 Jun 2011
Total Posts: 1418
24 Apr 2014 04:54 PM
@Demy,

ROBLOX scripts make their own method called waitForChild.
Basically what it does is, it repeats the wait() method until the object is found, and then returns the object.

That's waitForChild, if you're wondering how to make your own do this:

function waitForChild(obj,parent)
repeat wait() until parent:findFirstChild(obj.Name)
return obj
end

That's how I believe it goes anyway.
Report Abuse
Demystified is not online. Demystified
Joined: 05 Nov 2007
Total Posts: 6580
24 Apr 2014 04:55 PM
i mean why isn't it a built in
Report Abuse
12packkid is not online. 12packkid
Joined: 24 Jun 2011
Total Posts: 1418
24 Apr 2014 05:01 PM
I guess it's not necessary because the functions that build the function are already right in front of you.
Report Abuse
xXxMoNkEyMaNxXx is not online. xXxMoNkEyMaNxXx
Joined: 03 Oct 2008
Total Posts: 3120
24 Apr 2014 05:02 PM
waitForChild is in fact a built in method.
Report Abuse
12packkid is not online. 12packkid
Joined: 24 Jun 2011
Total Posts: 1418
24 Apr 2014 05:03 PM
Seriously? Now I don't have to keep on using repeat wait() until.
FINALLY! :)
Report Abuse
Demystified is not online. Demystified
Joined: 05 Nov 2007
Total Posts: 6580
24 Apr 2014 05:07 PM
it is?
didn't know
Report Abuse
VerifiedName is not online. VerifiedName
Joined: 26 Jul 2009
Total Posts: 4534
24 Apr 2014 05:12 PM
example

local player = game.Players:WaitForChild('LocalPlayer');

#nerdsunited
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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