Why is this returning false when both values are equal?

image

0, 0.0627451, 0.690196
0, 0.0627451, 0.690196

Workspace.Baseplate.Cities.Greece.Sitia

I don’t think you have 3200 meshparts and cities in your project.

In the if statement also include print(…, (if instance.Color == C3))

Might as well just post the whole script as because a three line snippet is not gonna cut it.

Thousands of lines in just one script and several systems.

This is a pretty funny thread lol.
My guess is due to floating points, the printed value is not the true value, so you should probably use some rounding method in your way to compare the Color3
Actually I just found someone with the same problem as you

1 Like

Expected ‘then’ when parsing if then else expression, got ‘)’

So if they compared brick colors instead the problem would be gone?

print(…, (instance.Color == C3))
Don’t know why I put an if.

Anyways I think you should check out what Azarctic said, they’re probably right.

I tried comparing by BrickColor as well which afaik would get past that problem. It didn’t work.

Tried the script, getting [false] printed. Very odd

The brickcolor comparison not working is beyond my knowledge. Should probably check out what Azarctic said, and if that doesn’t work reinstall studio. And if that doesn’t work, just retype the script. I’ve had a similar issue once for the longest time where I was unable to find the issue, so I retyped the script and it worked flawlessly.

yes, but you can also check if they’re “close enough”

Tried running the game through the RobloxPlayer as well. Same results, didn’t work.

Edit: rewrote the script like 6 or 7 times

print(
	raycastResult.Instance.Color==workspace.CountryData[countryName].C3.Value.."\n"..
	tostring(region.Color).."\n"..
	tostring(workspace.CountryData[countryName].C3.Value)
)

Now getting 'attempt to concatenate Color3 with string' when I tried the exact same thing earlier with no issue printing

wait so is there only one color value?

What do you mean one? >> char limit

Is there only one Color3Value that your using?

Currently, yes. >> char limit charss

So your using a color3value that remains the same color and comparing it to different colors? Or am i missing something?

Yes that’s it. >> chars char limit