|
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|