Why file creation on android is not working?

So I have a code that reads a high score and also saves it, it works fine while testing the game on the pc but the moment I send it to android it stops working, everything else is fine.

public void Save(int a)
	{
		score1 = a;
		//Debug.Log (score1);
		BinaryFormatter bf = new BinaryFormatter ();
		FileStream file = File.Create(Application.persistentDataPath + "/playerScore.dat");

		PlayerData puntaje = new PlayerData ();
		puntaje.score = score1;
		bf.Serialize (file, puntaje);
		file.Close();
	}
	public int Load()
	{
		if (File.Exists (Application.persistentDataPath + "/playerScore.dat")) {
			BinaryFormatter bf = new BinaryFormatter();
			FileStream file = File.Open(Application.persistentDataPath+ "/playerScore.dat", FileMode.Open);
			PlayerData puntaje = (PlayerData)bf.Deserialize(file);
			file.Close();
			score1 = puntaje.score;
			}
		return score1;
	}

Application.persistentDataPath in android refers to the public (external) storage, which is the SD card. For this to work, you must specify that the application requires SD card write access. You can do this in the build menu, select android, click player settings, and in other settings there is a parameter called “Write Access”, make sure it is set to “External”.

Your other option would be to use Application.dataPath instead, and it will write it in the internal memory belonging to the application.