|
| 16 Oct 2011 03:24 PM |
Hello, I would like some him with a script I'm writing.
Here's the error: "Pants is not a valid member of Model" And "Script "Workspace.Script", Line 19"
Here's the script:
function hit(newplayer) print (newplayer.Name)
player = game.Players:FindFirstChild(newplayer.Name) print (player)
if player:IsInGroup(165491) then print ("Newplayer: " .. newplayer.Name) player = game.Workspace:FindFirstChild(newplayer.Name) print (player) game.Workspace:FindFirstChild(newplayer.Name).Pants.PantsTemplate = "http://www.roblox.com/asset/?id=62836987" game.Workspace:FindFirstChild(newplayer.Name).Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=62836935"
else print ("Newplayer: " .. newplayer.Name) player = game.Workspace:FindFirstChild(newplayer.Name) print (player) game.Workspace:FindFirstChild(newplayer.Name).Pants.PantsTemplate = "http://www.roblox.com/asset/?id=62836987" game.Workspace:FindFirstChild(newplayer.Name).Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=62836935" end
end game.Players.PlayerAdded:connect(hit)
Thanks. |
|
|
| Report Abuse |
|
|
| |
|
Lowcart
|
  |
| Joined: 12 Sep 2011 |
| Total Posts: 1323 |
|
| |
|
|
| 16 Oct 2011 03:29 PM |
| I'm testing the script on myself, and I'm wearing pants. |
|
|
| Report Abuse |
|
|
|
| 16 Oct 2011 03:48 PM |
| I really would like to get this working. :) |
|
|
| Report Abuse |
|
|
GeneralSQ
|
  |
| Joined: 17 Apr 2011 |
| Total Posts: 81 |
|
|
| 16 Oct 2011 11:23 PM |
player = game.Workspace:FindFirstChild(newplayer.Name) print (player) game.Workspace:FindFirstChild(newplayer.Name).Pants.PantsTemplate = "http://www.roblox.com/asset/?id=62836987" game.Workspace:FindFirstChild(newplayer.Name).Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=62836935 |
|
|
| Report Abuse |
|
|
|
| 17 Oct 2011 11:15 AM |
| I don't see any difference between my script and the script you've given me. :/ |
|
|
| Report Abuse |
|
|
|
| 18 Oct 2011 10:13 AM |
| *Apart from the missing double quote. |
|
|
| Report Abuse |
|
|