|
| 14 Jul 2011 12:33 PM |
function Player(plr) wait(5) repeat wait() until plr.Character ~= nil for i, v in pairs(script:GetChildren()) do v:Clone().Parent = plr.Character p = plr.Character:GetChildren() for i = 1, #p do wait(0.0003) if (p[i].className == "Hat") then p[i]:remove()
if plr.TeamColor == BrickColor.new("Deep blue") then b = script.Blue:Clone() wait(3) b.Parent = plr.Character game.Lighting.Blue:Clone(1).Parent = plr.Character plr.Character.Head.BrickColor = BrickColor.new("Bright yellow")
if plr.TeamColor == BrickColor.new("Bright red") then wait(2) script.Red1:Clone().Parent = plr.Character script.Red:Clone().Plarent = plr.Character game.Lighting.Red:Clone(1).Parent = plr.Character wait(1) plr.Character.Head.BrickColor = BrickColor.new("Bright yellow") wait(1) end end end end end end game.Players.PlayerAdded:connect(Player)
How do i make this were if the players has Shirt then it deletes it and puts another one in it? |
|
|
| Report Abuse |
|
Benjamint
|
  |
| Joined: 18 Aug 2008 |
| Total Posts: 228 |
|
|
| 14 Jul 2011 01:06 PM |
shirtasset="" pantsasset=""
function give(p,n,t) if p:findFirstChild(n)==nil then Instance.new(t,p).Name=n end end
function checkChar(char)
give(char,"Shirt","Shirt") give(char,"Pants","Pants") char.Shirt.ShirtTemplate=shirtasset char.Pants.PantsTemplate=pantsasset
end
while true do wait() c=game.Players:getChildren() for i = 1, #c do if c[i].Character~=nil then checkChar(c[i].Character) end end end |
|
|
| Report Abuse |
|