How to differentiate Players? Photon Network

I want to differentiate first player who created the room and the second who joined the room.

Then I can make somehow get this working

if (GUI.Button(new Rect(100, 100, 250, 100), "Start Server")){
			
			PhotonNetwork.CreateRoom(roomName + System.Guid.NewGuid().ToString("N"),true,true,2);
			PhotonNetwork.playerName = "firstplayer";
			}

//another script
if( PhotonNetwork.playerName == "firstplayer")
//then he is controling first character

but its not working any ideas how to do it?

Check the documentation.

Looks as though you may want to use: PhotonNetwork.isMasterClient

I’m assuming the master client is the client that created the room. It can be changed once the room is created.