|
| 14 Oct 2014 12:43 AM |
Shirt = "http://www.roblox.com/asset/?id=121347127" Pants = "http://www.roblox.com/asset/?id=121347252"
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) for a,b in pairs(character:GetChildren()) do if b:IsA("Shirt") or b:IsA("Pants") or b:IsA("ShirtGraphic") then b:Destroy() end end local s = Instance.new("Shirt",character) s.ShirtTemplate = Shirt local p = Instance.new("Pants",character) p.PantsTemplate = Pants end) end)
Not working, yet not showing any output.
Sterkte Empire Brigaider DHS |
|
|
| Report Abuse |
|
|
|
| 14 Oct 2014 02:43 PM |
bump
Sterkte Empire Brigaider DHS |
|
|
| Report Abuse |
|
|
|
| 14 Oct 2014 03:05 PM |
B2
Sterkte Empire Brigaider DHS |
|
|
| Report Abuse |
|
|
Vyxium
|
  |
| Joined: 31 Aug 2010 |
| Total Posts: 1020 |
|
|
| 14 Oct 2014 03:11 PM |
| make it wait until there is a shirt or pants, it may just iterate before they load. |
|
|
| Report Abuse |
|
|
|
| 14 Oct 2014 03:16 PM |
What about players that don't wear shirts or pants? i.e noobs
Sterkte Empire Brigaider DHS |
|
|
| Report Abuse |
|
|
Vyxium
|
  |
| Joined: 31 Aug 2010 |
| Total Posts: 1020 |
|
|
| 14 Oct 2014 03:20 PM |
| use waitforchild or findfirstchild |
|
|
| Report Abuse |
|
|
|
| 14 Oct 2014 03:23 PM |
script.Parent:nil()
ur welcome |
|
|
| Report Abuse |
|
|
|
| 14 Oct 2014 03:58 PM |
Tried using FindFirstChild, that didn't work
Can't use WaitForChild, because that will wait until a shirt/pants/t-shirt exists, and what if they don't?
Sterkte Empire Brigaider DHS |
|
|
| Report Abuse |
|
|
|
| 14 Oct 2014 04:13 PM |
bump.....
Sterkte Empire Brigaider DHS |
|
|
| Report Abuse |
|
|
|
| 14 Oct 2014 04:14 PM |
Use the ChildAdded event in a function.
Example:
character.ChildAdded:connect(function(child) if child:IsA("Shirt") or child:IsA("Pants") or child:IsA("ShirtGraphic") then child:Destroy() end end) |
|
|
| Report Abuse |
|
|
|
| 14 Oct 2014 04:17 PM |
Also, you probably have to repeat Destroy() more than once. If you don't you'll get a message in the output about setting the short's parent to nil.
character.ChildAdded:connect(function(child) if child:IsA("Shirt") or child:IsA("Pants") or child:IsA("ShirtGraphic") then while child do child:Destroy() wait(.1) end end end) |
|
|
| Report Abuse |
|
|
|
| 14 Oct 2014 04:19 PM |
@Aesth Thanks! I'll try it out.
Sterkte Empire Brigaider DHS |
|
|
| Report Abuse |
|
|
|
| 14 Oct 2014 04:28 PM |
Wouldn't destroy my t-shirt?
Sterkte Empire Brigaider DHS |
|
|
| Report Abuse |
|
|