|
| 21 May 2014 08:49 PM |
This part of the script is suppose to remove the players hats it doesn't work can some one fix it?
for _,v in pairs(Player.Character:GetChildren()) do if v.ClassName == "Hat" then v:Destroy() |
|
|
| Report Abuse |
|
|
Azeroth17
|
  |
| Joined: 13 May 2014 |
| Total Posts: 86 |
|
|
| 21 May 2014 08:53 PM |
for i,v in pairs(game.Players:GetPlayers()) do if v.Character then for a,b in pairs(v.Character:GetChildren()) do if b.ClassName == "Hat" then b:Destroy() end end end end |
|
|
| Report Abuse |
|
|
|
| 21 May 2014 08:58 PM |
| Okay this is part of the script it's in a text button once the players clicks it the hats remove ohhhhhhhhh myyyy goooooodddddddddddd I should just go find a hat removing gui button mothhhhhhhhhhhherrrrrderper |
|
|
| Report Abuse |
|
|
Azeroth17
|
  |
| Joined: 13 May 2014 |
| Total Posts: 86 |
|
|
| 21 May 2014 09:03 PM |
put this in a localscript inside the button
pl = game.Players.LocalPlayer
script.Parent.MouseButton1Down:connect(function() if pl.Character then for i,v in pairs(pl.Character:GetChildren()) do if v.ClassName == "Hat" then v:Destroy() end end end end |
|
|
| Report Abuse |
|
|
|
| 21 May 2014 09:05 PM |
| I got it figured out thanks for the helps doh. |
|
|
| Report Abuse |
|
|