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: Functions as variables

Previous Thread :: Next Thread 
janthran is not online. janthran
Joined: 15 May 2009
Total Posts: 17429
28 Aug 2013 09:23 PM
Why is it that you can set print as a variable, but not FindFirstChild?

local find=FindFirstChild
local p=print
if Workspace:find("Baseplate")
then p("hi") end
>find is not a valid member of Workspace

local find=FindFirstChild
local p=print
if Workspace:FindFirstChild("Baseplate")
then p("hi") end
>hi
Report Abuse
ElectricBlaze is not online. ElectricBlaze
Joined: 18 Jul 2011
Total Posts: 22930
28 Aug 2013 09:31 PM
FindFirstChild is a method, not a function...

http://wiki.roblox.com/index.php/User:ElectricBlaze
Report Abuse
expressmyself is not online. expressmyself
Joined: 19 Apr 2011
Total Posts: 1768
28 Aug 2013 09:31 PM
print is a function findfirstchild is a method.
Report Abuse
expressmyself is not online. expressmyself
Joined: 19 Apr 2011
Total Posts: 1768
28 Aug 2013 09:37 PM
>:( He beat me to it.

http://wiki.roblox.com/index.php/User:Aeacus
Report Abuse
129K is not online. 129K
Joined: 23 Aug 2011
Total Posts: 19010
28 Aug 2013 11:02 PM
"FindFirstChild" would return nil, as it's not in the environment. Functions on the other hand are in the environment.
Report Abuse
janthran is not online. janthran
Joined: 15 May 2009
Total Posts: 17429
28 Aug 2013 11:04 PM
oh okay then
Thanks
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