Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
|
| 12 Oct 2012 09:51 AM |
game.Players.PlayerAdded:connect(function(ply) ply.CharacterAdded:connect(function(char) for i,v in pairs(char:GetChildren()) do if v:IsA("Clothing") or v:IsA("ShirtGraphic") then v:Destroy() end end end) end)
Its supposed to remove my clothes when i join... |
|
|
| Report Abuse |
|
|
|
| 12 Oct 2012 10:03 AM |
Clothing isn't a Class. Shirt or Pants is, though. Try that.
>Much love, YaYaBinks3. |
|
|
| Report Abuse |
|
|
Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
|
| 12 Oct 2012 10:22 AM |
game.Players.PlayerAdded:connect(function(ply) ply.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)
It didnt work :( |
|
|
| Report Abuse |
|
|
Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
| |
|
Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
| |
|
adark
|
  |
| Joined: 13 Jan 2008 |
| Total Posts: 6412 |
|
|
| 12 Oct 2012 11:04 AM |
| I'm not certain, but I'm pretty sure Destroying the Shirt and Pants objects don't remove the Texture. You have to set their assets to something completely invisible for it to work. |
|
|
| Report Abuse |
|
|
Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
|
| 12 Oct 2012 11:10 AM |
| Actually, i want to retexture the shirt and pants into clothes i want when i join, so how to do that? |
|
|
| Report Abuse |
|
|
adark
|
  |
| Joined: 13 Jan 2008 |
| Total Posts: 6412 |
|
|
| 12 Oct 2012 11:20 AM |
| Just change the ShirtTemplate and PantsTemplate properties to what you want. |
|
|
| Report Abuse |
|
|
human
|
  |
| Joined: 06 May 2007 |
| Total Posts: 2765 |
|
|
| 12 Oct 2012 11:21 AM |
| adarks right, I think, I just made something that removed my tshirt, but the image didn't go away. |
|
|
| Report Abuse |
|
|
Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
|
| 12 Oct 2012 11:43 AM |
game.Players.PlayerAdded:connect(function(ply) ply.CharacterAdded:connect(function(char) char.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=82203922" char.Pants.ShirtTemplate = "http://www.roblox.com/asset/?id=70643944" end) end)
Whats wrong with this? |
|
|
| Report Abuse |
|
|
human
|
  |
| Joined: 06 May 2007 |
| Total Posts: 2765 |
|
|
| 12 Oct 2012 12:00 PM |
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function() repeat wait() until player if player then wait(2) --idk if my comps lagging, but the clothing won't change without the wait. for i,v in pairs(player.Character:GetChildren()) do if v:IsA("Shirt") then print("shirt") v.ShirtTemplate = "http://www.roblox.com/asset/?id=47044626" elseif v:IsA("Pants") then print("pants") v.PantsTemplate = "http://www.roblox.com/asset/?id=70643944" end end end end) end) |
|
|
| Report Abuse |
|
|
Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
|
| 12 Oct 2012 12:11 PM |
so?:
game.Players.PlayerAdded:connect(function(ply) ply.CharacterAdded:connect(function(char) char.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=82203922" char.Pants.ShirtTemplate = "http://www.roblox.com/asset/?id=70643944" wait(2) end) end)
to make it simpler? |
|
|
| Report Abuse |
|
|
human
|
  |
| Joined: 06 May 2007 |
| Total Posts: 2765 |
|
|
| 12 Oct 2012 12:12 PM |
| No, I made mine "harder" because it prevents errors and the script from completely breaking if something isn't there or something isn't named correctly. |
|
|
| Report Abuse |
|
|
Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
| |
|
human
|
  |
| Joined: 06 May 2007 |
| Total Posts: 2765 |
|
| |
|
Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
|
| 12 Oct 2012 12:43 PM |
RLY, HOW did u test it, cuzz i didnt get different clothes:
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function() repeat wait() until player if player then wait(2) --idk if my comps lagging, but the clothing won't change without the wait. for i,v in pairs(player.Character:GetChildren()) do if v:IsA("Shirt") then print("shirt") v.ShirtTemplate = "http://www.roblox.com/asset/?id=82203922" elseif v:IsA("Pants") then print("pants") v.PantsTemplate = "http://www.roblox.com/asset/?id=70643944" end end end end) end) |
|
|
| Report Abuse |
|
|
human
|
  |
| Joined: 06 May 2007 |
| Total Posts: 2765 |
|
| |
|
Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
|
| 12 Oct 2012 12:52 PM |
| LIER!!!!!!! i also tested solo and no work :3 |
|
|
| Report Abuse |
|
|
Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
|
| 12 Oct 2012 12:57 PM |
| Does elseif count as an end? |
|
|
| Report Abuse |
|
|
Desperian
|
  |
| Joined: 07 Feb 2012 |
| Total Posts: 3371 |
|
|
| 12 Oct 2012 01:01 PM |
| An elseif statement does not require an end. I also tested it in solo and it worked, however I could not seem to make it work online (Humans script). |
|
|
| Report Abuse |
|
|
Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
| |
|
human
|
  |
| Joined: 06 May 2007 |
| Total Posts: 2765 |
|
|
| 12 Oct 2012 01:25 PM |
if player then for i,v in pairs(player.Character:GetChildren()) do if v:IsA("Shirt") then
3 ends + 2 for the functions I didn't put an end for elseif
try using player:WaitForDataReady() instead |
|
|
| Report Abuse |
|
|
human
|
  |
| Joined: 06 May 2007 |
| Total Posts: 2765 |
|
|
| 12 Oct 2012 01:26 PM |
| nvm about the ends, I thought you said I did. Anyways idk, the script works, but the changing of the textures is just being buggy. |
|
|
| Report Abuse |
|
|
Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
|
| 12 Oct 2012 01:47 PM |
| Grr i'll just use a morph button on the spawn -.- |
|
|
| Report Abuse |
|
|