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
 

Re: How to convert Color3 to BrickColor?

Previous Thread :: Next Thread 
jtefurd is not online. jtefurd
Joined: 01 May 2010
Total Posts: 952
03 Mar 2015 08:39 PM
For Example how would I make this work?
(Yes, this is within a local script.)
local potato = game.Players.LocalPlayer.Character["Body Colors"]
potato.HeadColor=Color3.new(game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame.BackgroundColor3)
Report Abuse
ChiefDelta is not online. ChiefDelta
Joined: 05 Nov 2010
Total Posts: 13071
03 Mar 2015 08:40 PM
/255
Report Abuse
ChiefDelta is not online. ChiefDelta
Joined: 05 Nov 2010
Total Posts: 13071
03 Mar 2015 08:40 PM
*255

and you may have to floor that
Report Abuse
jtefurd is not online. jtefurd
Joined: 01 May 2010
Total Posts: 952
03 Mar 2015 08:42 PM
What?
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
03 Mar 2015 08:42 PM
potato.HeadColor=BrickColor.new(game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame.BackgroundColor3)
Report Abuse
jtefurd is not online. jtefurd
Joined: 01 May 2010
Total Posts: 952
03 Mar 2015 08:44 PM
@cnt I tried your method, I had this similar problem months ago, I can't remember how I solved it. This is the error message in the output "(BrickColor expected, got userdata)"
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
03 Mar 2015 08:47 PM
Look at it carefully:
BrickColor.new(game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame.BackgroundColor3)

BrickColor.new(Color3) returns a BrickColor "closest to the Colo3".
Make sure you don't do Color3.new but BrickColor.new
Report Abuse
ChiefDelta is not online. ChiefDelta
Joined: 05 Nov 2010
Total Posts: 13071
03 Mar 2015 08:48 PM
I forgot that

I will sit in corner as punishment
Report Abuse
jtefurd is not online. jtefurd
Joined: 01 May 2010
Total Posts: 952
03 Mar 2015 08:49 PM
sch=script.Parent
cc=sch.ChosenColor
c=sch.Colors


for _,Color in pairs (c:GetChildren()) do
Color.MouseButton1Click:connect(function()
cc.BackgroundColor3=Color.BackgroundColor3
local pc=game.Players.LocalPlayer.Character["Body Colors"]
pc.HeadColor=BrickColor.new(Color.BackgroundColor3)
pc.LeftArmColor=Color3.new(Color.BackgroundColor3)
pc.RightArmColor=Color3.new(Color.BackgroundColor3)
end)
end
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
03 Mar 2015 08:50 PM
Yup, the problem is right in front of you.
Use BrickColor.new, as I said:

pc.HeadColor=BrickColor.new(Color.BackgroundColor3)
pc.LeftArmColor=BrickColor.new(Color.BackgroundColor3)
pc.RightArmColor=BrickColor.new(Color.BackgroundColor3)
Report Abuse
jtefurd is not online. jtefurd
Joined: 01 May 2010
Total Posts: 952
03 Mar 2015 08:51 PM
wow I'm dumb XD
Thanks lol
Report Abuse
verbalAKspray is not online. verbalAKspray
Joined: 09 Jul 2014
Total Posts: 23685
03 Mar 2015 08:52 PM
color3 to brickcolor = BrickColor.new(Color3.new(1,1,1)) -- that's white

brickcolor to color3 = Color3.new(workspace.Part.BrickColor.Color)
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
03 Mar 2015 09:03 PM
BrickColor.new(Color3.new())

Ta-da.
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