Problem with scene management :(

hey guys!
I am trying to load a specific scene if its the first time that the player is opening the game (login scene)
and open another scene if it is not the first time (player profile scene) and my code is like this
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using Backtory.Core.Public;
using UnityEngine.SceneManagement;

public class gamemanager : MonoBehaviour {
    public Text txt;
    int Hasplayed;
    MakeAcc accountmaker;
    void Awake()
    {
        //PlayerPrefs.SetInt("HasPlayed", 0);
        Hasplayed = PlayerPrefs.GetInt("HasPlayed");
    }
    void Start()
    {
        if (Hasplayed == 0)
        {
            SceneManager.LoadScene("Login" );
            //PlayerPrefs.SetInt("HasPlayed",1);
        }
        else if (Hasplayed==1)
        {
            SceneManager.LoadScene("PlayerProfile");
        }
    }
	void Update ()
    {
    }
}

the code seems right but when i run it i face the problem described in the image attached :frowning:

You gonna either need a third first scene, or do not load the login scene since it’s already the first one. in your script in your loading scene, just set the PlayerPrefs without loading login since it’s the scene you started with (at least to me it looks like that)