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: Clothing Script

Previous Thread :: Next Thread 
PurelyRandom is not online. PurelyRandom
Joined: 05 Mar 2011
Total Posts: 36763
20 Jun 2014 11:04 AM
Not sure why this isn't working. There are no errors:




game.Players.PlayerAdded:connect(function(player)
if player:GetRankInGroup(460795) >= 45 and player:GetRankInGroup(460795) <= 120 then
clothing = player.Character:GetChildren()
for i = 1, #clothing do
if clothing[i].Name == "Shirt" then
newshirt = clothing[i]:Clone()
newshirt.Parent = clothing.Parent
newshirt.ShirtTemplate = "http://www.roblox.com/asset/?id=157342887"
clothing:Destroy()
end
if clothing[i].Name == "Pants" then
newpants = clothing[i]:Clone()
newpants.Parent = clothing.Parent
newpants.PantsTemplate = "http://www.roblox.com/asset/?id=157343123"
clothing:Destroy()
end
end
end)
Report Abuse
PurelyRandom is not online. PurelyRandom
Joined: 05 Mar 2011
Total Posts: 36763
20 Jun 2014 11:30 AM
b1
Report Abuse
zsoltisawesome is not online. zsoltisawesome
Joined: 09 Sep 2010
Total Posts: 193
20 Jun 2014 11:32 AM
I think all you are missing is an end, it should look like this at the bottom:

end
end
end
end)

Report Abuse
PurelyRandom is not online. PurelyRandom
Joined: 05 Mar 2011
Total Posts: 36763
20 Jun 2014 11:37 AM
@zsolt; Woops. Sorry, I just forgot to add that.

This is a snippet of the script. There's no error with the ends in the actual script.
Report Abuse
zsoltisawesome is not online. zsoltisawesome
Joined: 09 Sep 2010
Total Posts: 193
20 Jun 2014 11:53 AM
I think you should do something like:

SEMI-PSEUDOCODE:

newshirt = Instance.new("shirt",playerModel)
newshirt.ShirtTemplate = "blah"
newshirt.Parent = playerMod

same with pants

playerMod should be equal to the players Model object (I forget how to do that...)



This is a really big mess, pardon me...
Report Abuse
PurelyRandom is not online. PurelyRandom
Joined: 05 Mar 2011
Total Posts: 36763
20 Jun 2014 11:57 AM
Ooooh. So right now it's access the Players service instead?
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