Xucs
|
  |
| Joined: 23 Jul 2010 |
| Total Posts: 11844 |
|
|
| 19 May 2015 11:10 PM |
local char = game.Players.LocalPlayer.Character local c = char:GetChildren() for i=1,#c do if c[i]:IsA("Shirt") or c[i]:IsA("Pants") then c[i]:Destroy() end end Instance.new("Pants",char).PantsTemplate = "http://www.roblox.com/Asset?id=248980267" Instance.new("Shirt",char).ShirtTemplate = "http://www.roblox.com/Asset?id=249917190"
Nothing happens :/
Leveraged/tixmaker101 + 55k posts | |
|
|
| Report Abuse |
|
|
mycheeze
|
  |
| Joined: 27 Jun 2011 |
| Total Posts: 6748 |
|
|
| 19 May 2015 11:17 PM |
local P = game.Players.LocalPlayer local C = P.Character or P.CharacterAdded:wait()
for _,_ in pairs (Character:GetChildren()) do if _:IsA'Shirt' or _:IsA'Pants' then _:Destroy() end end
Instance.new('Pants', C).PantsTemplate = 'rbxassetid://248980267' Instance.new('Shirt', C).ShirtTemplate = 'rbxassetid://249917190' |
|
|
| Report Abuse |
|
|
CrowClaws
|
  |
| Joined: 04 Jul 2010 |
| Total Posts: 4466 |
|
|
| 19 May 2015 11:17 PM |
replace char with this
local plr = game.Players.LocalPlayer local char = plr.Character or plr.CharacterAdded:wait() |
|
|
| Report Abuse |
|
|
CrowClaws
|
  |
| Joined: 04 Jul 2010 |
| Total Posts: 4466 |
|
|
| 19 May 2015 11:17 PM |
@mycheeze
you can't name variables _ and refer back to them |
|
|
| Report Abuse |
|
|
mycheeze
|
  |
| Joined: 27 Jun 2011 |
| Total Posts: 6748 |
|
|
| 19 May 2015 11:18 PM |
o & the other problem wiff dis c0de is, once the character is added, it still has to load hats & such, so I would suggest you use a descendant added function on the character model and then disconnect the function after a certain amount of time has expired.
Because if you left that function running, it would destroy your newly inserted shirts/pants |
|
|
| Report Abuse |
|
|
mycheeze
|
  |
| Joined: 27 Jun 2011 |
| Total Posts: 6748 |
|
|
| 19 May 2015 11:19 PM |
@Crow, yiss u kan
local _ = 'ye'
print(_) |
|
|
| Report Abuse |
|
|
CrowClaws
|
  |
| Joined: 04 Jul 2010 |
| Total Posts: 4466 |
|
|
| 19 May 2015 11:51 PM |
o rly?
but y r u naming 2 varis the same noob
|
|
|
| Report Abuse |
|
|
mycheeze
|
  |
| Joined: 27 Jun 2011 |
| Total Posts: 6748 |
|
|
| 19 May 2015 11:54 PM |
When I use that in a table, the first variable is equal to which position it is in the table, and the second being the value.
But since both are the same name, it is over-written by the second value
Similar to if you did this
local A = 1 A = 2
print(A)
>2 |
|
|
| Report Abuse |
|
|