I get an error for a reason i dont know

This error :
Assets/Multiplayer_manager.cs(58,9): error CS0428: Cannot convert method group GetComponent' to non-delegate type UnityEngine.GameObject’. Consider using parentheses to invoke the method

using UnityEngine;
using System.Collections;

public class Multiplayer_manager : MonoBehaviour {

	public static GameObject Myplayer;
	public static GameObject Myplayer2;

	void Start () {

		GameObject Myplayer = GameObject.FindGameObjectWithTag ("Enemy");

		Connect ();

	void Connect() {
		PhotonNetwork.ConnectUsingSettings( "V.02" );

	void OnJoinedLobby() {
		Debug.Log ("OnJoinedLobby");
		PhotonNetwork.JoinRandomRoom ();

	void Update () {

void CreateRoom () {


 void OnPhotonCreateGameFailed() {
	void OnPhotonRandomJoinFailed() {
		Debug.Log ("OnPhotonRandomJoinFailed");
		PhotonNetwork.CreateRoom( null );
		Debug.Log ("Roomname created");

	void OnJoinedRoom() {
		Debug.Log ("OnJoinedRoom");

	Myplayer = Myplayer.GetComponent<Birdmovement>;
		Debug.Log (Myplayer);


The error is line 53. Not sure why your compiler error has a different line - probably related to how the code is structured.

Line 53 says "grab the Birdmovement component and assign it to the GameObject called Myplayer. These types are different.

Myplayer = Myplayer.GetComponent();

I want to like if joined then if tag = “enemy” get the bridmovement script component disable it

One problem, like Graham said, is that you’re using:


which returns a Birdmovement object and are storing it into a GameObject variable.

The other problem (the one your error message is telling you about) is that you forgot the parenthesis in that line. Without the parenthesis instead of calling a method you’re trying to use that method as a delegate.

Create another variable of type Birdmovement and change line 53 to:

ThatNewVariable = Myplayer.GetComponent<Birdmovement>();