|
| 17 Jun 2015 08:14 PM |
I tried deleting the clothes that a player is wearing. I made this script, but it didn't work. Why?
for i,v in pairs(Character:GetChildren()) do if v:IsA("Shirt" and "Pants") then v:Destroy() end end |
|
|
| Report Abuse |
|
|
|
| 17 Jun 2015 08:19 PM |
for _,v in next, Character:GetChildren() do if v:IsA("Shirt") or v:IsA("Pants") then v:Destroy() end end |
|
|
| Report Abuse |
|
|
| |
|
|
| 17 Jun 2015 08:23 PM |
| have you defined Character |
|
|
| Report Abuse |
|
|
|
| 17 Jun 2015 08:24 PM |
game.Players.PlayerAdded:connect(function(plr) plr.CharacterAdded:wait() local char = plr.Character for i,v in pairs(char:GetChildren()) do if v:IsA("Shirt") or v:IsA("Pants") then v:Destroy() end end end)
hi, I exist |
|
|
| Report Abuse |
|
|
| |
|
|
| 17 Jun 2015 08:28 PM |
| Hypo, that didn't work either. |
|
|
| Report Abuse |
|
|
| |
|
vacha
|
  |
| Joined: 06 Jan 2011 |
| Total Posts: 1993 |
|
|
| 17 Jun 2015 09:46 PM |
game.Players.PlayerAdded:connect(function(plr) plr.CharacterAdded:connect(function(char) for i,v in pairs(char:GetChildren()) do if v:IsA("Shirt") or v:IsA("Pants") then v:Destroy() end end end) end) there while true do the do |
|
|
| Report Abuse |
|
|
|
| 22 Jun 2015 06:32 PM |
| Why does it work if we put a while true do around it? |
|
|
| Report Abuse |
|
|