Unity returning error on PunRPC

Options

I am making an FPS online game with photon. Everything would work but I am getting these two errors: The type or namespace name 'PunRPC' could not be found (are you missing a using directive or an assembly reference?) and Assets\Scripts\Health.cs(9,3): error CS0246: The type or namespace name 'PunRPCAttribute' could not be found (are you missing a using directive or an assembly reference?).

Here's my Script;

using System.Collections;

using System.Collections.Generic;

using UnityEngine;


public class Health : MonoBehaviour

{

  public int health;

[PunRPC]

public void TakeDamage(int damage)

{

health -= damage;

if(health <= 0)

{

Destroy(gameObject);

}

}

}


I thing there is missing a script called PunRPC but I am not sure, can someone please help me, I tried everything.

Answers