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: Checking if a Model contains

Previous Thread :: Next Thread 
alibix123 is not online. alibix123
Joined: 14 Nov 2009
Total Posts: 766
11 Apr 2014 04:06 PM
I want to check if a model contains a humanoid, it doesn't have to be specific to humanoid btw.
Report Abuse
RoflBread is not online. RoflBread
Joined: 18 Jun 2009
Total Posts: 3803
11 Apr 2014 04:06 PM
if model:FindFirstChild("Humanoid") then
--
end
Report Abuse
SenseiWarrior is online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
11 Apr 2014 04:07 PM
g = PathWayToModel:GetChildren()
for i=1, #g do
if g[i].ClassName == "Humanoid" then
--stuff
end
end
Report Abuse
SenseiWarrior is online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
11 Apr 2014 04:07 PM
@Rofl

What if the humanoid is named something else
Report Abuse
RoflBread is not online. RoflBread
Joined: 18 Jun 2009
Total Posts: 3803
11 Apr 2014 04:09 PM
Who renames humanoids? Yeah, your is foolproof.
Report Abuse
SenseiWarrior is online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
11 Apr 2014 04:09 PM
Sometimes

Just sometimes
Report Abuse
Spongocardo is not online. Spongocardo
Joined: 06 Sep 2008
Total Posts: 2843
11 Apr 2014 04:10 PM
@Rofl Humanoids are renamed for certain purposes. E.G: Classification.

When life gives you lemons... BURN HIS HOUSE DOWN! >:D
Report Abuse
JigglingJack is not online. JigglingJack
Joined: 25 Mar 2014
Total Posts: 11263
11 Apr 2014 04:10 PM
for i,v in pairs(Model:GetChildren()) do
if v:IsA("Humanoid") then
print'human'
end end

i'm asian
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