Network functions not working properly

I have a function in the game scene and it is:

function OnPlayerConnected(player : NetworkPlayer)
{
Debug.Log(“Player has connected”);
}

The function never gets called. What am I doing wrong?

Is the function located in a script that is attached to a GameObject in the scene?

Yes it is. I even copy and pasted the code from the documentation and it still didn’t work.

hmmm, very odd. What if you create a new project?