|
| 25 Jul 2012 04:15 AM |
This script is supposed to check if a user has a shirt, tshirt, or pants and remove them. Also hats. It isn't giving me any errors and I have tried all that I can please help!
game.Players.PlayerAdded:connect(function(p) p.CharacterAdded:connect(function(c) repeat wait() until p.Character and c:findFirstChild("Body Colors") bodycolors = c["Body Colors"] yellow = "Bright yellow" green = "Camo" blue = "Bright blue" bodycolors.HeadColor = BrickColor.new(yellow) bodycolors.LeftArmColor = BrickColor.new(yellow) bodycolors.LeftLegColor = BrickColor.new(green) bodycolors.RightArmColor = BrickColor.new(yellow) bodycolors.RightLegColor = BrickColor.new(green) bodycolors.TorsoColor = BrickColor.new(blue) local d = c:GetChildren() for i=1, #d do if (d[i].className == "Hat") then d[i]:Destroy() end end if c then return end if c.Pants ~= nil and c.Shirt ~= nil then print("Shirts and pants exist, removing them") c.Pants:Destroy() c.Shirt:Destroy() else print("User has no pants or Shirt") end c.Head.face.Texture = "rbxasset://textures/face.png" if c["Shirt Graphic"] ~= nil then c["Shirt Graphic"]:Destroy() else print("User has no tshirt") end end) end) |
|
|
| Report Abuse |
|
|
| |
|
| |
|
Cheater
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 5258 |
|
|
| 25 Jul 2012 04:19 AM |
Freaking Lag.
What I wanted to write is, you should put some prints to see, where the script even runs to. |
|
|
| Report Abuse |
|
|
| |
|
|
| 25 Jul 2012 04:22 AM |
ok, found it, but i dont know the problem
if c then return end if c.Pants ~= nil and c.Shirt ~= nil then print("Shirts and pants exist, removing them") c.Pants:Destroy() c.Shirt:Destroy() else print("User has no pants or Shirt") end print("passed 4") c.Head.face.Texture = "rbxasset://textures/face.png" print("passed 5") if c["Shirt Graphic"] ~= nil then c["Shirt Graphic"]:Destroy() else print("User has no tshirt") end |
|
|
| Report Abuse |
|
|
Cheater
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 5258 |
|
| |
|
|
| 25 Jul 2012 04:25 AM |
found the error
look and check please
if c then return end if c.Pants ~= nil and c.Shirt ~= nil then print("Shirts and pants exist, removing them") c.Pants:Destroy() c.Shirt:Destroy() else print("User has no pants or Shirt") end print("passed 4") c.Head.face.Texture = "rbxasset://textures/face.png" print("passed 5") if c["Shirt Graphic"] ~= nil then c["Shirt Graphic"]:Destroy() else print("User has no tshirt") end |
|
|
| Report Abuse |
|
|
Cheater
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 5258 |
|
|
| 25 Jul 2012 04:26 AM |
| Where's the error if you found it? Is it not printing something or what? |
|
|
| Report Abuse |
|
|
|
| 25 Jul 2012 04:27 AM |
This clunk doesnt work
if c then return end if c.Pants ~= nil and c.Shirt ~= nil then print("Shirts and pants exist, removing them") c.Pants:Destroy() c.Shirt:Destroy() else print("User has no pants or Shirt") end print("passed 4") c.Head.face.Texture = "rbxasset://textures/face.png" print("passed 5") if c["Shirt Graphic"] ~= nil then c["Shirt Graphic"]:Destroy() else print("User has no tshirt") end |
|
|
| Report Abuse |
|
|
Cheater
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 5258 |
|
|
| 25 Jul 2012 04:29 AM |
| You mean it doesn't work from "if c then return end" on? |
|
|
| Report Abuse |
|
|
|
| 25 Jul 2012 04:30 AM |
ok, removed
if c then return end
but now
if c["Shirt Graphic"] ~= nil then c["Shirt Graphic"]:Destroy() else print("User has no tshirt") end
doesnt wrok |
|
|
| Report Abuse |
|
|
Cheater
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 5258 |
|
|
| 25 Jul 2012 04:32 AM |
| Isn't it Shirt Graphics? Can't check right now. |
|
|
| Report Abuse |
|
|
| |
|
Cheater
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 5258 |
|
|
| 25 Jul 2012 04:33 AM |
| Can you even remove it or is it locked aswell as Body Colors? |
|
|
| Report Abuse |
|
|
|
| 25 Jul 2012 04:40 AM |
Yes you can
now i am having roubles under line 25
idk wat it be
if c.Pants ~= nil and c.Shirt ~= nil then print("Shirts and pants exist, removing them") c.Pants:Destroy() c.Shirt:Destroy() else print("User has no pants or Shirt") end print("passed33") c.Head.face.Texture = "rbxasset://textures/face.png" print("passed") if c["Shirt Graphic"] ~= nil then c["Shirt Graphic"]:Destroy() else print("User has no tshirt") end |
|
|
| Report Abuse |
|
|
Cheater
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 5258 |
|
|
| 25 Jul 2012 04:43 AM |
| Euhm line 25... which one is line25? |
|
|
| Report Abuse |
|
|
|
| 25 Jul 2012 04:45 AM |
I just posted below line 25, but here it is:
if c.Pants ~= nil and c.Shirt ~= nil then print("Shirts and pants exist, removing them") c.Pants:Destroy() c.Shirt:Destroy() else print("User has no pants or Shirt") end print("passed33") c.Head.face.Texture = "rbxasset://textures/face.png" print("passed") if c["Shirt Graphic"] ~= nil then c["Shirt Graphic"]:Destroy() else print("User has no tshirt") end print("passed41") |
|
|
| Report Abuse |
|
|
Cheater
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 5258 |
|
|
| 25 Jul 2012 04:46 AM |
if c:findFirstChild("Pants") ~= nil and c:findFirstChild("Shirt") ~= nil then --if there's no Shirt and no Pants, nothing happens print("Shirts and pants exist, removing them") c.Pants:Destroy() c.Shirt:Destroy() else print("User has no pants or Shirt") end print("passed33") --does this print? c.Head.face.Texture = "rbxasset://textures/face.png" print("passed") if c["Shirt Graphic"] ~= nil then c["Shirt Graphic"]:Destroy() else print("User has no tshirt") end print("passed41") |
|
|
| Report Abuse |
|
|
|
| 25 Jul 2012 04:49 AM |
| everything works fine, but it doesn't remove the shirt and pants :[. |
|
|
| Report Abuse |
|
|
|
| 25 Jul 2012 04:51 AM |
| nvm, it works for now, but doesnt remove the shirtgraphic |
|
|
| Report Abuse |
|
|
Cheater
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 5258 |
|
|
| 25 Jul 2012 04:52 AM |
| I think it's because it's locked. |
|
|
| Report Abuse |
|
|
| |
|
|
| 25 Jul 2012 04:54 AM |
| No, it isn't that. There is an image named roblox inside of the torso that contains the shirt graphic. |
|
|
| Report Abuse |
|
|