|
| 13 Apr 2015 03:13 PM |
while true do wait(0.1) local w = game.Workspace:GetChildren() for i = 1, #w do c = w[i]:GetChildren() for i=1, #c do if (c[i].className == "ShirtGraphic") then c[i]:destroy() if (c[i].className == "Part") then n = c[i]:GetChildren() for i=1, #n do if (n[i].className == "Decal") then n[i]:destroy() end end end end end end end
Nothing appears in output. |
|
|
| Report Abuse |
|
|
|
| 13 Apr 2015 03:14 PM |
| I'm sorry, the title should say 'remover'. my bad. |
|
|
| Report Abuse |
|
|
Klink45
|
  |
| Joined: 06 Jun 2011 |
| Total Posts: 26054 |
|
|
| 13 Apr 2015 03:14 PM |
| Is this only supposed to affect players? |
|
|
| Report Abuse |
|
|
|
| 13 Apr 2015 03:19 PM |
| I added a line of code that requires the name to be "roblox" if it wants to delete it. It still doesn't change the code, however, and that's what I need fixed. It removes 'shirtgraphic' but not the decal, which is the only thing keeping the object on the torso. |
|
|
| Report Abuse |
|
|
|
| 13 Apr 2015 03:26 PM |
read this closely:
if (c[i].className == "ShirtGraphic") then c[i]:destroy() if (c[i].className == "Part") then n = c[i]:GetChildren() for i=1, #n do if (n[i].className == "Decal") then n[i]:destroy() end end end end
so if c[i]'s className is "ShirtGraphic" and it's className is "Part" it should loop through it? I promise that is never the case xD
use else |
|
|
| Report Abuse |
|
|
|
| 13 Apr 2015 03:37 PM |
I used elseif and nothing changed.
if (c[i].className == "ShirtGraphic") then c[i]:destroy() elseif (c[i].className == "Part") then n = c[i]:GetChildren() for i=1, #n do if (n[i].className == "Decal") then if (n[i].className == "roblox") then n[i]:destroy() else end end end end |
|
|
| Report Abuse |
|
|
|
| 13 Apr 2015 03:38 PM |
| I'm stupid but I did it! "roblox" isn't the className! Huzzah. |
|
|
| Report Abuse |
|
|
|
| 13 Apr 2015 03:39 PM |
if (n[i].className == "Decal") then if (n[i].className == "roblox") then |
|
|
| Report Abuse |
|
|
|
| 13 Apr 2015 03:40 PM |
| (The forums should notify me when someone posts something while I'm typing a post...) |
|
|
| Report Abuse |
|
|