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: Need hat remover script

Previous Thread :: Next Thread 
greatestdan is not online. greatestdan
Joined: 08 Sep 2008
Total Posts: 504
12 Sep 2011 09:39 PM
not thi is not a request. I know that to make the hat remover script it involces an on child added function. then using getchildren() and checking the classnames of each of them to see if they are a hat then deleting the hats. But I can not do the actual removing of the hat. of course removing someone's hat is probably about 5-10 lines and i am going to add it to a script that is 48 lines that I made completely myself. I just need the pert of the script that actually fins and removes the hats. The script I made is an onchildadded to workspace function.
Report Abuse
nate890 is not online. nate890
Joined: 22 Nov 2008
Total Posts: 21686
12 Sep 2011 09:43 PM
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
for _,v in pairs(character:GetChildren()) do
if v:IsA("Hat") then
v:remove()
end
end
end)
end)


­<'+1 Post. Ujelly?'>
Report Abuse
greatestdan is not online. greatestdan
Joined: 08 Sep 2008
Total Posts: 504
12 Sep 2011 09:54 PM
Didn't work. I even tried to edit it a little but that didn't fix it.
Report Abuse
nate890 is not online. nate890
Joined: 22 Nov 2008
Total Posts: 21686
12 Sep 2011 09:55 PM
I suggest you add a wait to that. Hats take a moment to load

­<'+1 Post. Ujelly?'>
Report Abuse
nate890 is not online. nate890
Joined: 22 Nov 2008
Total Posts: 21686
12 Sep 2011 09:56 PM
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
wait(2)
for _,v in pairs(character:GetChildren()) do
if v:IsA("Hat") then
v:remove()
end
end
end)
end)


­<'+1 Post. Ujelly?'>
Report Abuse
greatestdan is not online. greatestdan
Joined: 08 Sep 2008
Total Posts: 504
12 Sep 2011 09:56 PM
riiight. That was the problem with a health bar remover I made before. The healthbar doesnt load immediately so it always says "HealthGUI is not a valid member of PlayerGui"

must be the same thing for this. It had no errors because it was on on if then statement.
Report Abuse
greatestdan is not online. greatestdan
Joined: 08 Sep 2008
Total Posts: 504
12 Sep 2011 09:59 PM
cool it works. Now I just need to make the script remove your face to finish my hologramifier script.
Report Abuse
greatestdan is not online. greatestdan
Joined: 08 Sep 2008
Total Posts: 504
12 Sep 2011 10:01 PM
ok now tomorrow gotta work on my place I am putting that in. I hope that it will get popular. I have seen the idea of it before but I think mine will be the best.
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