Soldrion
(Soldrion)
February 3, 2023, 12:15am
#1
I have a game that has a for loop that goes through a bunch of parts and changes their BrickColor. I changed it to Color3 since the color that it changes it to is based off of a Color3 Value in the folder that the part is in. All Unions inside all color to black, any idea why?
robloxapp-20230202-1910332.wmv (997.6 KB)
edit: changed the if province:IsA("part) to province.Color = Color3.fromRGB(Color.Value) and now it’s freaking out
robloxapp-20230202-1918256.wmv (411.7 KB)
Thank you so much guys, everything colors fine now. I appreciate everything, you’re the best!
Dfn150
(DevFunNewIdeas)
February 3, 2023, 12:18am
#2
Could this possible because of this line right here: local Color = nation:WaitForChild("Color")
what is that “Color” value?
Soldrion
(Soldrion)
February 3, 2023, 12:20am
#3
the value of the Color3 Value "Color
Dfn150
(DevFunNewIdeas)
February 3, 2023, 12:21am
#4
Ok, is the RGB the wrong color code?
Also you don’t have to take screenshots of your code all the time, just click the </> button on the top
DasKairo
(Cairo)
February 3, 2023, 12:21am
#5
UnionOperation.UsePartColor
Dfn150
(DevFunNewIdeas)
February 3, 2023, 12:22am
#6
It isn’t a part though, it looks like it is a string value inside a folder
Soldrion
(Soldrion)
February 3, 2023, 12:22am
#7
Changed to .new, results:
robloxapp-20230202-1922108.wmv (763.2 KB)
DasKairo
(Cairo)
February 3, 2023, 12:23am
#8
UsePartColor
is the UnionOperation
property that allows for you to Apply a Color to a UnionOperation
rather than it being a Set Color.
2 Likes
Soldrion
(Soldrion)
February 3, 2023, 12:24am
#9
its province.UsePartColor = true province.Color = Color3.new(Color.Value)
now, still is all black
Soldrion
(Soldrion)
February 3, 2023, 12:26am
#10
both parts and Unions go all black when i use .Color
, but not when BrickColor.new(Color.Value)
DasKairo
(Cairo)
February 3, 2023, 12:29am
#11
Also, just to let you know, BrickColor
and Color3.new()
uses numbers from 0 - 1
, and not
0 - 255
as they use Decimals as their format / code, BrickColor
has a Built-In Library of Colors you can Choose from instead of inserting numbers, they also give you the RGB format that makes the color, so if you are using numbers between 0 - 255
, you would need to divide by 255
to get the expected Color. plus, you would need to round that number (either down or up).
Plus, you should be using Color3.fromRGB
, Color3.fromHSV
, or Color3.fromHex
for specific functionality of specific Color formats.
Dfn150
(DevFunNewIdeas)
February 3, 2023, 12:30am
#12
province.Color = Color3.fromRGB(Color.Value)
Try using this
Soldrion
(Soldrion)
February 3, 2023, 12:40am
#13
Tried FromHSV
and I found out it is only passing one argument from the Color3 Value, what do I do, how do I get the whole Value?
DasKairo
(Cairo)
February 3, 2023, 12:42am
#14
HSV has 3 Values, Hue
, Saturation
, and value
, I would Recommend looking into this:
So far we always used RGB colors in our shaders, meaning the components of our color vector always map to the red green and blue components of the color. This is great if we want to render the color or tint it, but adjusting the hue or saturation...
DasKairo
(Cairo)
February 3, 2023, 12:44am
#17
Yeah, I already said what That would do to your code:
DasKairo:
Also, just to let you know, BrickColor
and Color3.new()
uses numbers from 0 - 1
, and not
0 - 255
as they use Decimals as their format / code, BrickColor
has a Built-In Library of Colors you can Choose from instead of inserting numbers, they also give you the RGB format that makes the color, so if you are using numbers between 0 - 255
, you would need to divide by 255
to get the expected Color. plus, you would need to round that number (either down or up).
Soldrion
(Soldrion)
February 3, 2023, 12:44am
#18
it’s just grabbing the first value, though I have printed it out before and it printed the entire thing???
Soldrion
(Soldrion)
February 3, 2023, 12:45am
#19
yeah but its only taking the 0 apparently?