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 » Scripters
Home Search
 

TextButton clothes change help

Previous Thread :: Next Thread 
Xenothekid is not online. Xenothekid
Joined: 13 Sep 2013
Total Posts: 73
13 Jul 2017 12:40 PM
I've been trying to work out a way so that when you click on a TextButton, it changes your clothes. My script is here for reference.

wut.yes.MouseButton1Click:connect(function()

game.Players.Player:Connect(function(player)
player.Character:Connect(function(boots)
boots:FindFirstChild("Pants")
if boots then
print("cake")
boots.PantsTemplate = "insertIDhere"

end
end)
Report Abuse
Xenothekid is not online. Xenothekid
Joined: 13 Sep 2013
Total Posts: 73
13 Jul 2017 12:45 PM
I had to remove some things, so I am aware that some "end" parts need to have a bracket following them. the main point is that the game doesn't seem to like this section very much:

game.Players.Player:Connect(function(player)
player.Character:Connect(function(boots)
boots:FindFirstChild("Pants")
if boots then
print("cake")
boots.PantsTemplate = "insertIDhere"
Report Abuse
Gomlsauresrex is not online. Gomlsauresrex
Joined: 25 Mar 2016
Total Posts: 3588
13 Jul 2017 12:51 PM
"Character" is not a RBXScriptSignal. "Character" is the model in the workspace associated with a client's roblox avatar.

CharacterAdded is the RBXScriptSignal you want.
Report Abuse
Gomlsauresrex is not online. Gomlsauresrex
Joined: 25 Mar 2016
Total Posts: 3588
13 Jul 2017 01:04 PM
Same thing "Player", it's supposed to be "PlayerAdded" or "ChildAdded"
Report Abuse
Gomlsauresrex is not online. Gomlsauresrex
Joined: 25 Mar 2016
Total Posts: 3588
13 Jul 2017 01:04 PM
Same thing for "Player" *
Report Abuse
Xenothekid is not online. Xenothekid
Joined: 13 Sep 2013
Total Posts: 73
13 Jul 2017 01:39 PM
So overall, the coding is correct except for the parts you pointed out?
Report Abuse
Gomlsauresrex is not online. Gomlsauresrex
Joined: 25 Mar 2016
Total Posts: 3588
13 Jul 2017 01:43 PM
haha, no
Report Abuse
Gomlsauresrex is not online. Gomlsauresrex
Joined: 25 Mar 2016
Total Posts: 3588
13 Jul 2017 01:44 PM
jk.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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