| |
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 24 Apr 2014 04:39 PM |
| Also, why isn't waitForChild() a BIF? |
|
|
| Report Abuse |
|
|
|
| 24 Apr 2014 04:40 PM |
What is a BIF?
Here's my siggy... Done. |
|
|
| Report Abuse |
|
|
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 |
|
|
| |
|
|
| 24 Apr 2014 04:44 PM |
@Demyst Oh right.
Here's my siggy... Done. |
|
|
| Report Abuse |
|
|
|
| 24 Apr 2014 04:45 PM |
is BIF a legit acronym or is it just something i made up
4getting |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 24 Apr 2014 04:47 PM |
probably
anyway
why isn't it :( |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 24 Apr 2014 04:55 PM |
| i mean why isn't it a built in |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 24 Apr 2014 05:02 PM |
| waitForChild is in fact a built in method. |
|
|
| Report Abuse |
|
|
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 |
|
|
| |
|
|
| 24 Apr 2014 05:12 PM |
example
local player = game.Players:WaitForChild('LocalPlayer');
#nerdsunited |
|
|
| Report Abuse |
|
|