generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: [Help Needed] Clothes Changing Script

Previous Thread :: Next Thread 
triston220 is not online. triston220
Joined: 08 Mar 2010
Total Posts: 1861
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
triston220 is not online. triston220
Joined: 08 Mar 2010
Total Posts: 1861
16 Oct 2011 03:26 PM
*help, not him
Report Abuse
Lowcart is not online. Lowcart
Joined: 12 Sep 2011
Total Posts: 1323
16 Oct 2011 03:27 PM
[ Content Deleted ]
Report Abuse
triston220 is not online. triston220
Joined: 08 Mar 2010
Total Posts: 1861
16 Oct 2011 03:29 PM
I'm testing the script on myself, and I'm wearing pants.
Report Abuse
triston220 is not online. triston220
Joined: 08 Mar 2010
Total Posts: 1861
16 Oct 2011 03:48 PM
I really would like to get this working. :)
Report Abuse
GeneralSQ is not online. 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
triston220 is not online. triston220
Joined: 08 Mar 2010
Total Posts: 1861
17 Oct 2011 11:15 AM
I don't see any difference between my script and the script you've given me. :/
Report Abuse
triston220 is not online. triston220
Joined: 08 Mar 2010
Total Posts: 1861
18 Oct 2011 10:13 AM
*Apart from the missing double quote.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image