Why dont this script work?

Basicly I’m trying to make it so if the server host disconnects, ALL player objects gets wiped.

function OnDisconnectedFromServer (player: NetworkPlayer) {
		Debug.Log("Disconnected from server: " + player);
        Network.RemoveRPCs(player);
		Network.DestroyPlayerObjects(player);

}

This should work shouldn’t it!?

Gives me error : Script error: OnDisconnectedFromServer This message parameter has to be of type: The message will be ignored.

I just dont understand it

OnDisconnectedFromServer doesn’t take a network player as an argument. The parameter should be a NetworkDisconnection object, which presumably will give the reason why you were disconnected. You will have to figure out which network player was disconnected some other way.