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 » Scripters
Home Search
 

Re: attempt to call method 'IsA' (a nil value)

Previous Thread :: Next Thread 
Gladii is not online. Gladii
Joined: 10 Mar 2012
Total Posts: 1713
05 Dec 2014 09:18 PM
if loaded == loaded:GetChildren():IsA("Hat") then
Report Abuse
ChiefDelta is not online. ChiefDelta
Joined: 05 Nov 2010
Total Posts: 13071
05 Dec 2014 09:19 PM
for i, v in pairs(loaded:GetChildren()) do
if v:IsA'Hat' then
end
end
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
05 Dec 2014 11:41 PM
loaded == loaded:GetChildren():IsA("Hat") Im not sure what that is supposed to be

GetChildren() returns a table

so doing that is like saying


local tab = {
workspace.Part0;
workspace.Part1;
workspace.Part2;
}

tab:IsA("Hat")
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
06 Dec 2014 12:22 AM
Or you can take the metatable approach :)
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
06 Dec 2014 12:58 AM
I don't see how that would help anything more than looping through the list
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
06 Dec 2014 01:00 AM
Well it would still loop through the list, but you won't have to do it manually.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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