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: What's Wrong, Here?

Previous Thread :: Next Thread 
evilishnessII is not online. evilishnessII
Joined: 26 Mar 2011
Total Posts: 10275
06 Apr 2012 11:12 AM
c=game.Workspace:GetChildren()
for i=1,#c do
if c[i].className=="Hat" then c[i]:remove() end
end


It's a child of the workspace.

It's supposed to either delete a hat from each respawning character, which I didn't make it to, or delete stray hats in the workspace.
Report Abuse
Duderino99 is not online. Duderino99
Joined: 04 Aug 2009
Total Posts: 320
06 Apr 2012 12:18 PM
c=game.Workspace:GetChildren()
for i=1,#c do
if c[i].className == "Hat" then
c[i]:remove()
end
end
Report Abuse
3lex33 is not online. 3lex33
Joined: 08 Oct 2008
Total Posts: 5220
06 Apr 2012 12:28 PM
if c[i].ClassName == "Hat"

Anyway, i heard that a lot of people had rather same problem. Try checking if part have mesh inside it.
Report Abuse
breuning is not online. breuning
Joined: 30 Oct 2008
Total Posts: 4268
06 Apr 2012 12:52 PM
if c[i]:IsA("Hat") then
Report Abuse
evilishnessII is not online. evilishnessII
Joined: 26 Mar 2011
Total Posts: 10275
06 Apr 2012 06:38 PM
Still doesn't work.
Report Abuse
Catblox is not online. Catblox
Joined: 23 Apr 2008
Total Posts: 2223
06 Apr 2012 07:08 PM
Try "Accoutrement" rather than "Hat", and see if that works. Sometimes they get called that.
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