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
 

How do I determine the amount of children in a parent?

Previous Thread :: Next Thread 
zeax12 is not online. zeax12
Joined: 11 Sep 2008
Total Posts: 433
23 Oct 2013 10:31 AM
I need to know, because I'm working on a script that has the line:
math.random(1,[amount of things in something])

Iv'e been searching everywhere to find the method, but I haven't found anything.
Is there a method?
Thank you for reading!
Report Abuse
zeax12 is not online. zeax12
Joined: 11 Sep 2008
Total Posts: 433
23 Oct 2013 10:45 AM
Bump... Please help me. :c
Report Abuse
SCARFACIAL is not online. SCARFACIAL
Joined: 28 Jan 2010
Total Posts: 7970
23 Oct 2013 11:05 AM
local NumberOfChildren = #Parent:GetChildren()
Report Abuse
sbk28 is not online. sbk28
Joined: 15 Nov 2008
Total Posts: 2528
23 Oct 2013 11:05 AM

local Children = Parent:GetChildren()

local ChildCount = #Children
Report Abuse
zeax12 is not online. zeax12
Joined: 11 Sep 2008
Total Posts: 433
23 Oct 2013 11:19 AM
Thank you guys, I will test the script out now!! :D
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