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 » Scripters
Home Search
 

Re: cannot get t-shirt maker to work

Previous Thread :: Next Thread 
soniclover88888 is not online. soniclover88888
Joined: 01 Feb 2008
Total Posts: 6723
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
soniclover88888 is not online. soniclover88888
Joined: 01 Feb 2008
Total Posts: 6723
13 Apr 2015 03:14 PM
I'm sorry, the title should say 'remover'. my bad.
Report Abuse
Klink45 is not online. Klink45
Joined: 06 Jun 2011
Total Posts: 26054
13 Apr 2015 03:14 PM
Is this only supposed to affect players?
Report Abuse
soniclover88888 is not online. soniclover88888
Joined: 01 Feb 2008
Total Posts: 6723
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
buildersteven4 is not online. buildersteven4
Joined: 08 May 2009
Total Posts: 1325
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
soniclover88888 is not online. soniclover88888
Joined: 01 Feb 2008
Total Posts: 6723
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
soniclover88888 is not online. soniclover88888
Joined: 01 Feb 2008
Total Posts: 6723
13 Apr 2015 03:38 PM
I'm stupid but I did it! "roblox" isn't the className! Huzzah.
Report Abuse
buildersteven4 is not online. buildersteven4
Joined: 08 May 2009
Total Posts: 1325
13 Apr 2015 03:39 PM
if (n[i].className == "Decal") then
if (n[i].className == "roblox") then
Report Abuse
buildersteven4 is not online. buildersteven4
Joined: 08 May 2009
Total Posts: 1325
13 Apr 2015 03:40 PM
(The forums should notify me when someone posts something while I'm typing a post...)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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