What do I do wrong in my simple turn based game?

I’m trying to make a Tic Tac Toe game but for some reason the game is acting like if it was always Player2’s turn.

Turns.js

#pragma strict

static var Player1 = true;
static var Player2 = false

Click.js

#pragma strict

var material1 : Material; //for X
var material2 : Material; //for O
var isX = false;
bar isO = false;

function OnMouseDown()
{
   if(Turns.Player1 == true)
   {
     renderer.material = material1;
     Turns.Player1 = false;
     Turns.Player2 = true;
     isX = true
   }
   if(Turns.Player2 == true)
   {
      renderer.material = material2;
      Turns.Player2 = false;
      Turns.Player1 = true;
      isO = true
   } 
}

Try using

if ( Turns.Player1 == true )
{

}
else if { Turns.Player2 == true )
{

}

You set Turns.Player2 = true in the first if(), so it’s alway true in the second if() after entering the first one.