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: Question about findFirstChild

Previous Thread :: Next Thread 
789cab is not online. 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 is not online. 789cab
Joined: 13 Jul 2009
Total Posts: 3145
04 Jan 2012 04:14 PM
I put the if and then in []'s.
Report Abuse
TheNewScripter is not online. TheNewScripter
Joined: 02 Mar 2010
Total Posts: 2432
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 is not online. 3lex33
Joined: 08 Oct 2008
Total Posts: 5220
04 Jan 2012 04:16 PM
O_O
Whats the difference?
Report Abuse
789cab is not online. 789cab
Joined: 13 Jul 2009
Total Posts: 3145
04 Jan 2012 04:17 PM
Thanks.
Report Abuse
789cab is not online. 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 is not online. 3lex33
Joined: 08 Oct 2008
Total Posts: 5220
04 Jan 2012 04:18 PM
Yes!
Report Abuse
789cab is not online. 789cab
Joined: 13 Jul 2009
Total Posts: 3145
04 Jan 2012 04:37 PM
A lot of people use findFirstChild.
Report Abuse
TheNewScripter is not online. TheNewScripter
Joined: 02 Mar 2010
Total Posts: 2432
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 is not online. 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
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