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: Counting children

Previous Thread :: Next Thread 
UgOsMiLy is not online. UgOsMiLy
Joined: 15 Sep 2009
Total Posts: 2095
28 Oct 2013 11:31 AM
If a model has 5 children (parts) how do i make something that counts the children and tells everybody?
Report Abuse
Scriptural is not online. Scriptural
Joined: 06 Sep 2013
Total Posts: 2979
28 Oct 2013 11:44 AM
function ThinkOfTheChilren(Object)
Message = Instance.new("Message", script)
Message.Text = Object.Name .. " has " .. #Object:GetChildren() .. " children"
Game:GetService("Debris"):AddItem(Message, 3)
end

ThinkOfTheChildren(Workspace.Model)
Report Abuse
UgOsMiLy is not online. UgOsMiLy
Joined: 15 Sep 2009
Total Posts: 2095
28 Oct 2013 11:51 AM
That is a good idea but i need it in a local thing (example: local amountochildren = .....)
Report Abuse
MeBilly8440 is not online. MeBilly8440
Joined: 27 Jul 2009
Total Posts: 2783
28 Oct 2013 11:54 AM
local amountofchildren = #part:GetChildren()

This is my siggy when I'm at school c:
Report Abuse
UgOsMiLy is not online. UgOsMiLy
Joined: 15 Sep 2009
Total Posts: 2095
28 Oct 2013 12:16 PM
Thanks
Report Abuse
Scriptural is not online. Scriptural
Joined: 06 Sep 2013
Total Posts: 2979
28 Oct 2013 01:01 PM
"Good idea"
Its the full script
Report Abuse
crazyman32 is not online. crazyman32
Joined: 13 Apr 2008
Total Posts: 18027
28 Oct 2013 02:23 PM
"
'Good idea'
Its the full script
"

Hahaha sounds like a Project Manager
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