transform.LocalScale not working

does anyone knwo why my code is nt working if your wondering the code its just to flip the character around its a 2d game btw thats why i use Vector2 instead of 3transform.LocalScale = new Vector2(-1,1);

transform.LocalScale = new Vector2(-1,1);

thats the code dont know why it didnt work before