Cannot convert type `UnityEngine.GameObject' to `UnityEngine.Rigidbody'

I’m getting this error and not sure why i’m trying to instantiate a fire ball over the network so each client can see it instead of just the one who made it.

Assets/Scripts/PlayerAttack.cs(79,120): error CS0039: Cannot convert type UnityEngine.GameObject' to UnityEngine.Rigidbody’ via a built-in conversion

no idea why this isn’t working any help would be very appreciated.

A GameObject isn’t a rigidbody. You can’t cast a gameobject to a rigidbody, which is what you’re trying to do here:

Rigidbody fbInstance;
fbInstance = PhotonNetwork.Instantiate (myPrefab, playerHand.position, playerHand.rotation,0) as Rigidbody;
fbInstance.velocity = transform.TransformDirection(playerHand.forward * fbSpeed);

You’ll want to grab the GameObject, and set the velocity of it’s rigidbody:

GameObject fbInstance;
fbInstance = PhotonNetwork.Instantiate (myPrefab, playerHand.position, playerHand.rotation,0) as Rigidbody;
fbInstance.rigidBody.velocity = transform.TransformDirection(playerHand.forward * fbSpeed);