|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 13 Jul 2017 01:04 PM |
| Same thing "Player", it's supposed to be "PlayerAdded" or "ChildAdded" |
|
|
| Report Abuse |
|
|
| |
|
|
| 13 Jul 2017 01:39 PM |
| So overall, the coding is correct except for the parts you pointed out? |
|
|
| Report Abuse |
|
|
| |
|
| |
|