|
| 15 Sep 2013 01:34 PM |
script.Parent.MouseButton1Down:connect(function() playername = script.Parent.Parent.Parent.Parent.Name player = Workspace:FindFirstChild(""..playername.."") if player ~= nil then player:FindFirstChild("BodyColors").HeadColor = "Light orange" player:FindFirstChild("BodyColors").LeftArmColor = "Light orange" player:FindFirstChild("BodyColors").LeftLegColor = "Black" player:FindFirstChild("BodyColors").RightArmColor = "Light orange" player:FindFirstChild("BodyColors").RightLegColor = "Black" player:FindFirstChild("BodyColors").TorsoColor = "Black" end end)
What is wrong with this? |
|
|
| Report Abuse |
|
|
| |
|
|
| 15 Sep 2013 01:38 PM |
| BrickColor.new("Light orange") |
|
|
| Report Abuse |
|
|
| |
|
|
| 15 Sep 2013 01:56 PM |
| Insufficient information was given. Sorry, can't help. |
|
|
| Report Abuse |
|
|
fire243
|
  |
| Joined: 04 Apr 2010 |
| Total Posts: 6532 |
|
|
| 15 Sep 2013 01:57 PM |
| you need to replace headcolors and stuff like that to BrickColor.new("Place Color Here") |
|
|
| Report Abuse |
|
|
|
| 15 Sep 2013 02:04 PM |
script.Parent.MouseButton1Down:connect(function() playername = script.Parent.Parent.Parent.Parent.Name player = Workspace:FindFirstChild(""..playername.."") if player ~= nil then player:FindFirstChild("Shirt"):remove() player:FindFirstChild("Pants"):remove() player:FindFirstChild("ShirtGraphic"):remove() player:FindFirstChild("Head").BrickColor.new("Light orange") player:FindFirstChild("Left Arm").BrickColor.new("Light orange") player:FindFirstChild("Left Leg").BrickColor.new("Black") player:FindFirstChild("Right Arm").BrickColor.new("Light orange") player:FindFirstChild("Right Leg").BrickColor.new("Black") player:FindFirstChild("Torso").BrickColor.new("Black") end end)
Like that? |
|
|
| Report Abuse |
|
|
3rdblox
|
  |
| Joined: 09 Dec 2012 |
| Total Posts: 4741 |
|
|
| 15 Sep 2013 02:10 PM |
| What if there's someone called Part in the game, and you've got a Part in the Workspace? (May not be the problem, but just to tell you...) |
|
|
| Report Abuse |
|
|
| |
|
blocco
|
  |
| Joined: 14 Aug 2008 |
| Total Posts: 29474 |
|
|
| 15 Sep 2013 02:16 PM |
Use localscript Use local player stop being inefficient |
|
|
| Report Abuse |
|
|
|
| 15 Sep 2013 02:18 PM |
| player.Torso.BrickColor = BrickColor.new("Black") |
|
|
| Report Abuse |
|
|
fire243
|
  |
| Joined: 04 Apr 2010 |
| Total Posts: 6532 |
|
|
| 15 Sep 2013 02:31 PM |
| AND, all those colors are wrong. look at the actual name in studio. |
|
|
| Report Abuse |
|
|
|
| 15 Sep 2013 02:32 PM |
| ^The awkward moment when you think you're right but you're wrong... Black and Light orange are valid brick colors. |
|
|
| Report Abuse |
|
|
|
| 15 Sep 2013 02:35 PM |
| Mhm, they are..I checked in studio ;) |
|
|
| Report Abuse |
|
|
|
| 15 Sep 2013 02:39 PM |
Still not working, am i doing something wrong?
script.Parent.MouseButton1Down:connect(function() local playername = script.Parent.Parent.Parent.Parent.Name --Is it to do with this? local player = Workspace:FindFirstChild(""..playername.."") --Or this? if player ~= nil then player:FindFirstChild("Shirt"):remove() --Works player:FindFirstChild("Pants"):remove() --Works player:FindFirstChild("ShirtGraphic"):remove() --Works player:FindFirtsChild("Head").face:remove --This doesn't work player:FindFirstChild("Head").BrickColor = BrickColor.new("Light orange") --Doesn't work player:FindFirstChild("Left Arm")BrickColor.new("Light orange") --Doesn't work player:FindFirstChild("Left Leg")BrickColor.new("Black") --Doesn't work player:FindFirstChild("Right Arm")BrickColor.new("Light orange") --Doesn't work player:FindFirstChild("Right Leg")BrickColor.new("Black") --Doesn't work player.Torso.BrickColor = BrickColor.new("Black") --Doesn't work end end) |
|
|
| Report Abuse |
|
|
blocco
|
  |
| Joined: 14 Aug 2008 |
| Total Posts: 29474 |
|
| |
|
| |
|
|
| 15 Sep 2013 02:44 PM |
| Look at the output, I'm sure that it'll make it clear what's wrong. |
|
|
| Report Abuse |
|
|
blocco
|
  |
| Joined: 14 Aug 2008 |
| Total Posts: 29474 |
|
|
| 15 Sep 2013 02:49 PM |
local player = game.Players.LocalPlayer; script.Parent.MouseButton1Down:connect(function() player:ClearCharacterAppearance(); local bodyColors = Instance.new("BodyColors"); bodyColors.HeadColor = BrickColor.new("Light orange"); bodyColors.TorsoColor = BrickColor.new("Black"); bodyColors.LeftArmColor = BrickColor.new("Light orange"); bodyColors.RightArmColor = BrickColor.new("Light orange"); bodyColors.LeftLegColor = BrickColor.new("Black"); bodyColors.RightLegColor = BrickColor.new("Black"); bodyColors.Parent = player.Character; end) |
|
|
| Report Abuse |
|
|
blocco
|
  |
| Joined: 14 Aug 2008 |
| Total Posts: 29474 |
|
|
| 15 Sep 2013 02:52 PM |
If you want to be really clean:
local player, create = game.Players.LocalPlayer, LoadLibrary("RbxUtility").Create; script.Parent.MouseButton1Down:connect(function() player:ClearCharacterAppearance(); (Create "BodyColors" { HeadColor = BrickColor.new("Light orange"); TorsoColor = BrickColor.new("Black"); LeftArmColor = BrickColor.new("Light orange"); RightArmColor = BrickColor.new("Light orange"); LeftLegColor = BrickColor.new("Black"); RightLegColor = BrickColor.new("Black"); }).Parent = player.Character end) |
|
|
| Report Abuse |
|
|
| |
|
blocco
|
  |
| Joined: 14 Aug 2008 |
| Total Posts: 29474 |
|
|
| 15 Sep 2013 03:05 PM |
| Now, study that code. Realize what makes it work. Realize why the second method I posted didn't work, even though it should have. Realize how you can fix that. |
|
|
| Report Abuse |
|
|