Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Color3 values seem to set ImageColor3 to 255,255,255 but visually it's 0,0,0?

So I have 2 lines of code;

local preset1 = script.Parent.preset1
preset1.Preview.ImageColor3 = Color3.fromRGB(preset1.Colour.Value)

This is simple, you'd expect it to work but instead it doesn't, instead of functioning properly it doesn't change the colour if I check the value but visually, it's just pitch black. I don't get any errors whatsoever and I'm 100% sure I'm doing the right thing, what's going on?

2 comments

0

When using Color3.fromRGB() it expects 3 values, red value, green value, and blue value.Your only giving it one, I guess since its only recieving one its turning pitch black.I dont really know.

0

Can you please tell me what preset1.Colour.Value is?

2 answers

✓ Accepted answer

If preset1.Color.Value is a Color3Value then you dont need to use Color3.fromRGB

try

Color3.fromRGB Example:

local preset1 = script.Parent.preset1.Colour.Value
local R = preset1.R
local G = preset1.G
local B = preset1.B
preset1.Preview.ImageColor3 = Color3.fromRGB(R,G,B)

Normal Color3.new Example:

local preset1 = script.Parent.preset1.Colour.Value
local R = preset1.R/255
local G = preset1.G/255
local B = preset1.B/255
preset1.Preview.ImageColor3 = Color3.new(R,G,B)

This discussion is preserved as it was. New answers, comments, and votes are closed.