Krosskode
|
  |
| Joined: 26 Aug 2010 |
| Total Posts: 11001 |
|
|
| 19 Apr 2015 10:53 AM |
So, inside a script, I need to change the BodyColors back to what they were before, so I've ran:
v.BrickColor = BrickColor.new(Player.Character["Body Colors"].HeadColor)
How exactly do you reference the color from the BodyColor object?
I've tried just .HeadColor, .HeadColor.Value, and .HeadColor.BrickColor.
They didn't work, but hey, they were worth a shot. |
|
|
| Report Abuse |
|
|
|
| 19 Apr 2015 11:05 AM |
im not sure what you mean but cant you just have a variable of the colors from before. e.g. headColor = Player.Character.Head.BrickColor
then that color is stored in the variable 'headColor' which you can access later e.g. v.BrickColor = BrickColor.new(headColor)
i havnt tested it or know what your talking about but ill just write it anyway :L |
|
|
| Report Abuse |
|
|
Krosskode
|
  |
| Joined: 26 Aug 2010 |
| Total Posts: 11001 |
|
|
| 19 Apr 2015 11:07 AM |
| That is possible, but I was hoping to use the Body Colors object to simplify things. |
|
|
| Report Abuse |
|
|
Intern33t
|
  |
| Joined: 19 Nov 2010 |
| Total Posts: 1530 |
|
|
| 19 Apr 2015 11:09 AM |
workspace.Part.BrickColor = workspace.Player["Body Colors"].HeadColor
this worked for me |
|
|
| Report Abuse |
|
|
Krosskode
|
  |
| Joined: 26 Aug 2010 |
| Total Posts: 11001 |
|
|
| 19 Apr 2015 11:12 AM |
| It tells me, "'new' (Color3 expected, got userdata)" |
|
|
| Report Abuse |
|
|
|
| 19 Apr 2015 11:13 AM |
isnt Player.Character.Head.BrickColor the same as Player.Character["BodyColors"].HeadColor ? |
|
|
| Report Abuse |
|
|
Intern33t
|
  |
| Joined: 19 Nov 2010 |
| Total Posts: 1530 |
|
|
| 19 Apr 2015 11:14 AM |
| not always, enzo. just on join, after join the headcolor can be changed and then it will be not the same with Body Colors.HeadColor |
|
|
| Report Abuse |
|
|
Krosskode
|
  |
| Joined: 26 Aug 2010 |
| Total Posts: 11001 |
|
|
| 19 Apr 2015 11:20 AM |
| Enzo, I change it when the Player uses their sword. |
|
|
| Report Abuse |
|
|
|
| 19 Apr 2015 11:25 AM |
| i don't really understand what the problem is :L |
|
|
| Report Abuse |
|
|
Krosskode
|
  |
| Joined: 26 Aug 2010 |
| Total Posts: 11001 |
|
|
| 19 Apr 2015 11:35 AM |
I have a function that runs when the player equips and unequips a sword.
I have an argument to tell whether or not they are equipping the sword or unequipping it.
When it's equipped, it changes the players' body color.
When it's unequipped, I want it to change the body color back which is located inside of the Body Colors object.
|
|
|
| Report Abuse |
|
|
|
| 19 Apr 2015 11:42 AM |
when they equip the sword cant you make a variable of game.Workspace.Player["Body Colors"] then when they unequipped do game.Workspace.Player["Body Colors"] = (variable from before)
|
|
|
| Report Abuse |
|
|
|
| 19 Apr 2015 11:43 AM |
| not game.workspace but the player...you know what i mean |
|
|
| Report Abuse |
|
|
Krosskode
|
  |
| Joined: 26 Aug 2010 |
| Total Posts: 11001 |
|
|
| 19 Apr 2015 11:47 AM |
| I got it to work, nevermind. |
|
|
| Report Abuse |
|
|