TheJKM98
|
  |
| Joined: 20 Dec 2010 |
| Total Posts: 511 |
|
|
| 01 Feb 2014 05:47 PM |
I have this:
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) local shirt = Instance.new("Shirt" , character) shirt.Name = "Shirt" shirt.Parent = character shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=114303438" print(player.Name .. " got a new shirt!") local pants = Instance.new("Pants" , character) pants.Name = "Pants" pants.Parent = character pants.PantsTemplate = "http://www.roblox.com/asset/?id=114305174" print(player.Name .. " got some new pants!") local p = character:GetChildren() local h = character.Head:GetChildren() for j = 1 , #h do if h[j]:IsA("Decal") then h[j].Texture = "http://www.roblox.com/asset/?id=144080495 " --Slightly altered default face end end for i = 1 , #p do if p[i]:IsA("Shirt") then p[i].ShirtTemplate = "http://www.roblox.com/asset/?id=114303438" --Black Polo print("Shirt ID corrected.") elseif p[i]:IsA("Pants") then p[i].PantsTemplate = "http://www.roblox.com/asset/?id=114305174" --Jeans print("Pants ID corrected.") elseif p[i]:IsA("ShirtGraphic") then p[i]:Destroy() print("NO TEE-SHIRT FOR YOU!") elseif p[i]:IsA("Hat") then p[i]:Destroy() print("NO HAT FOR YOU!") end end character:WaitForChild("Humanoid").Died:connect(function() player.leaderstats.Money.Value = player.leaderstats.Money.Value - 400 player.leaderstats.Heat.Value = 0 end) end) end)
It will print everything like it does something, but the problem is that the shirt and pants don't actually exist!
I don't understand. I look in the player's character via explorer, and it isn't there!
Any ideas?
P.S. - Sorry for the repost. |
|
|
| Report Abuse |
|
|
TheJKM98
|
  |
| Joined: 20 Dec 2010 |
| Total Posts: 511 |
|
| |
|
TheJKM98
|
  |
| Joined: 20 Dec 2010 |
| Total Posts: 511 |
|
|
| 02 Feb 2014 11:51 AM |
I guess I say 'bump' now.
bump |
|
|
| Report Abuse |
|
|
Vyxium
|
  |
| Joined: 31 Aug 2010 |
| Total Posts: 1020 |
|
|
| 02 Feb 2014 11:54 AM |
| nobody is gonna go through that entire script and debug it. please cut it down to where you think the error is |
|
|
| Report Abuse |
|
|
TheJKM98
|
  |
| Joined: 20 Dec 2010 |
| Total Posts: 511 |
|
|
| 02 Feb 2014 12:01 PM |
I said what the problem is:
'It will print everything like it does something, but the problem is that the shirt and pants don't actually exist!'
I gave you the entire script (40 lines) because I have absolutely no idea why the clothes don't appear in the character. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 02 Feb 2014 12:03 PM |
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) local shirt = Instance.new("Shirt" , character) Shirt.Name = "Shirt" Shirt.Parent = character Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=114303438" print(player.Name .. " got a new shirt!") local pants = Instance.new("Pants" , character) Pants.Name = "Pants" Pants.Parent = character Pants.PantsTemplate = "http://www.roblox.com/asset/?id=114305174" print(player.Name .. " got some new pants!") local p = character:GetChildren() local h = character.Head:GetChildren() for j = 1 , #h do if h[j]:IsA("Decal") then h[j].Texture = "http://www.roblox.com/asset/?id=144080495 " --Slightly altered default face end end for i = 1 , #p do if p[i]:IsA("Shirt") then p[i].ShirtTemplate = "http://www.roblox.com/asset/?id=114303438" --Black Polo print("Shirt ID corrected.") elseif p[i]:IsA("Pants") then p[i].PantsTemplate = "http://www.roblox.com/asset/?id=114305174" --Jeans print("Pants ID corrected.") elseif p[i]:IsA("ShirtGraphic") then p[i]:Destroy() print("NO TEE-SHIRT FOR YOU!") elseif p[i]:IsA("Hat") then p[i]:Destroy() print("NO HAT FOR YOU!") end end character:WaitForChild("Humanoid").Died:connect(function() player.leaderstats.Money.Value = player.leaderstats.Money.Value - 400 player.leaderstats.Heat.Value = 0 end) end) end)
Here you go. PM me if it won't work then I will make another script for you.
The script I will make will do the same thing as this.
|
|
|
| Report Abuse |
|
|
TheJKM98
|
  |
| Joined: 20 Dec 2010 |
| Total Posts: 511 |
|
|
| 02 Feb 2014 12:10 PM |
^That didn't work.
Also, what did you do to it? That looks no different than what I said. |
|
|
| Report Abuse |
|
|
|
| 02 Feb 2014 12:15 PM |
| I edited some lines. That should've debugged it.... Hm. I will look over it some more. |
|
|
| Report Abuse |
|
|