Player not connecting???

Hello when i start a game and when my friend is trying to connect it won’t work for some reason he will click the connect button but nothing happens please help.

using UnityEngine;
using System.Collections;
using System;

public class Multiplayer : MonoBehaviour
{

public string connectToIp = “127.0.0.1”;
public int connectPort = 25000;
public bool useNAT = false;
public string ipaddress = “”;
public string port = “”;

string playerName = “Enter a name”;

void OnGUI()
{
if (Network.peerType == NetworkPeerType.Disconnected)
{
if (GUILayout.Button(“Connect”))
{
if (playerName != “Enter a name”)
{
Network.Connect(connectToIp, connectPort);
PlayerPrefs.SetString(“PlayerName”, playerName);
}
}

if (GUILayout.Button(“Start Server”))
{
if (playerName != “Enter a name”)
{
Network.InitializeServer(32, connectPort, true);

foreach (GameObject go in FindObjectsOfType(typeof(GameObject)))
{
go.SendMessage(“LoadedLevel”, SendMessageOptions.DontRequireReceiver);
}
PlayerPrefs.SetString(“Enter a name”, playerName);
}
}

playerName = GUILayout.TextField(playerName);
connectToIp = GUILayout.TextField(connectToIp);
connectPort = Convert.ToInt32(GUILayout.TextField(connectPort.To String()));
}
else
{
if (Network.peerType == NetworkPeerType.Connecting) GUILayout.Label(“Connect Status: Connecting”);
else if (Network.peerType == NetworkPeerType.Client)
{
GUILayout.Label(“Connect Status: Client”);
GUILayout.Label("ping to Server: " + Network.GetAveragePing(Network.connections[0]));
}
else if (Network.peerType == NetworkPeerType.Server)
{
GUILayout.Label(“Connection Status: Server:”);
GUILayout.Label("ping to Server: " + Network.connections.Length);
if (Network.connections.Length >= 1)
GUILayout.Label("ping to Server: " + Network.GetAveragePing(Network.connections[0]));
}

if (GUILayout.Button(“Disconnect”))
Network.Disconnect(200);

ipaddress = Network.player.ipAddress;
port = Network.player.port.ToString();
//GUILayout.Label("IP Address: " + ipaddress + “:” + port);
}
}

void OnConnectedToServer()
{
foreach (GameObject go in FindObjectsOfType(typeof(GameObject)))
{
go.SendMessage(“LoadedLevel”, SendMessageOptions.DontRequireReceiver);
}
}
}

is your friend on the same pc as you : public string connectToIp = “127.0.0.1”; ?

127.0.0.1 means local. So both of you on same network?

i changed the ip address to my own ip but still does not work?

And we are using different computers

are you on the same ip subnet ? or is your friend at his home ? do you know anything about ip port forwarding ? have you got a router/firewall thats blocking the port ? If you don’t understand what i’m asking, you will have to google the questions and go from there.

The firewall is not blocking it at all and my friend is at his house