789cab
|
  |
| Joined: 13 Jul 2009 |
| Total Posts: 3145 |
|
|
| 04 Jan 2012 04:14 PM |
Do you need to use the if and then?
ex:
[if] game.Workspace:findFirstChild("Part") [then] |
|
|
| Report Abuse |
|
|
789cab
|
  |
| Joined: 13 Jul 2009 |
| Total Posts: 3145 |
|
|
| 04 Jan 2012 04:14 PM |
| I put the if and then in []'s. |
|
|
| Report Abuse |
|
|
|
| 04 Jan 2012 04:15 PM |
Yes. But `findFirstChild` is depreciated. Use `FindFirstChild` instead.
local Part = Workspace:FindFirstChild("Part") if Part ~= nil then print("ASDF") end
×TNS× |
|
|
| Report Abuse |
|
|
3lex33
|
  |
| Joined: 08 Oct 2008 |
| Total Posts: 5220 |
|
| |
|
789cab
|
  |
| Joined: 13 Jul 2009 |
| Total Posts: 3145 |
|
| |
|
789cab
|
  |
| Joined: 13 Jul 2009 |
| Total Posts: 3145 |
|
|
| 04 Jan 2012 04:17 PM |
| What is the difference between 'findFirstChild' and 'FindFirstChild'? |
|
|
| Report Abuse |
|
|
3lex33
|
  |
| Joined: 08 Oct 2008 |
| Total Posts: 5220 |
|
| |
|
789cab
|
  |
| Joined: 13 Jul 2009 |
| Total Posts: 3145 |
|
|
| 04 Jan 2012 04:37 PM |
| A lot of people use findFirstChild. |
|
|
| Report Abuse |
|
|
|
| 04 Jan 2012 04:47 PM |
Their is probably no difference, but ROBLOX has said that `findFirstChild` is depreciated, and to just use `FindFirstChild`. It's complicated, but it's probably some small glitches fixed... No idea, but that's usually what they do.
×Dyslexic Scripter at Work× |
|
|
| Report Abuse |
|
|
Chronok
|
  |
| Joined: 29 Dec 2011 |
| Total Posts: 402 |
|
|
| 04 Jan 2012 04:48 PM |
There is no difference between findFirstChild and FindFirstChild besides one being camelCase and the other PascalCase. However, it seems that ROBLOX is bent on making everything PascalCase, so now findFirstChild is deprecated, as well as getChildren (although that one happened a while ago).
{ ["Chronok"] = "Intermediate scripter/programmer." } |
|
|
| Report Abuse |
|
|