Basically I’m a little confused by your example here
Parts don’t have a BackgroundColor3??? So you’d need to do BrickColor instead
local Color3_Selection = Color3.fromRGB(20,53,85)
if game.Workspace.Part.BrickColor == BrickColor.new(Color3_Selection) then -- It'll round it to the nearest brickcolor it can find
Also ~ is not, so idk if you knew what you were doing but you were basically doing
if BrickColor1 not equal to BrickColor2 then
– some magical code