Why is this returning false when both values are equal?

Try putting the line where it changes it red before the if statement

The part that changes red is not the problem.

That won’t change anything because the part changing red is not being referenced in the if statement at all.

So, just to be clear, your checking if the mesh part is the same color as the color3value which is RED. Right? Or is it another color?

the C3 value is based on the country you select. Each country has a different C3 value.
For some countries, the script works. For some, some provinces either retain the colour they had before and for others, none of the provinces change.

Is the color changing in another script or in the same script?

if Instance.Color == C3.Value then
     Instance.Color3 = Color3.new(1,1,1)
end

I don’t know why this thread is so long.

Same script. >> char limit char limit

Color3 is not a valid member of MeshPart

Edit: the thread is long because what is going on makes no sense at all

OK. This worked for me.

if Instance.Color == C3.Value then
     Instance.Color = Color3.new(1,1,1)
end

Yep that script works for me as well, SOMETIMES. Other times, it fails.

Edit: this is the thing; it doesnt work for some provinces even though the colour matches.

Then something is wrong with your script. Might as well make a whole thread discussing it, because this is getting off topic and long as your issue with color matching is solved.

Add an else statement that prints the instance.color, c3, and instance:getfullname()

Yes I know something is wrong with my script, thats why I came here.

Yep tried that. It prints the entire instance location and also prints the colours.

The colours match and the instance is the right province. No idea how this is happening

You’ve only sent us the part relevant to the color comparison, is there another part of your script that’s wrong?

Hm? C3 isnt a part, its a Color3Value and it is static. It is not the same as the part that turns red.

So it is failing the if statement even though they are equal?

Yep thats the issue. char limit

Send a screenshot
Charrrsrsrsrsrrss