Photon Network Player Spawn looping

I have little problem with photon network player spawning. When i join game it will spawn forever players. I don’t know why it is looping…

using System;
using UnityEngine;
using System.Collections;

public class NetworkManager1 : MonoBehaviour{

	private bool networkBIN;
	private bool joinedLobby;
     
    public string roomName; 

	void Start(){
		networkBIN = false;
	}

    void Update()
    {
        if (joinedLobby == true)
        {
            SpawnMyPlayer();
        }
    }

	void OnGUI(){
		if (networkBIN == false){
		if (GUI.Button(new Rect(Screen.width / 2, Screen.height / 2,100, 50), "Network")){
			networkBIN = true;
			ConnectToLobby();
		}
	}
		GUILayout.Label(PhotonNetwork.connectionStateDetailed.ToString());

        if (joinedLobby == true)
        {

            roomName = GUI.TextField(new Rect(Screen.width / 2, Screen.height / 2, 100, 50), roomName, 25);

            if (GUI.Button(new Rect(Screen.width / 2, Screen.height / 2 - 50, 100, 50), "Create"))
            {
              
                CreateRoom(roomName);
            } 
            
            if (GUI.Button(new Rect(Screen.width / 2, Screen.height / 2 + 50, 100, 50), "Join Room"))
            {
               
                PhotonNetwork.JoinRoom("rN");
            }

        }
}
			void ConnectToLobby(){
		PhotonNetwork.ConnectUsingSettings("1.0");

	}

		void OnJoinedLobby(){

		joinedLobby = true;
	}
        void CreateRoom(String rN)
        {
            PhotonNetwork.CreateRoom("rN");
        }
        void OnPhotonJoinRoomFailed()
        {

        }
        void SpawnMyPlayer()
        {
            PhotonNetwork.Instantiate("Player", new Vector3(0f, 0.5f, 0f), Quaternion.identity, 0);
        }
}

Continue spawn player because joinedLobby is true and in update continue to call SpawnMyPlayer().

try something like:

bool ok_enter_room;

// in start
ok_enter_room = false;

//In your code OnGUI
if (joinedLobby == true)
         {
             ......

             if (GUI.Button(new Rect(Screen.width / 2, Screen.height / 2 + 50, 100, 50), "Join Room"))
             {
                
                 PhotonNetwork.JoinRoom("rN");

                 //SET TO TRUE
                 ok_enter_room = true;

             }
}

if(ok_enter_room == true){

	if(GUI.Button(new Rect(150,450,150,50 ), "Spawn")){
  		  SpawnMyPlayer();

 }
}

And delete code in your update.