I trying to apply damage to the health bar . I got one error. Here is my script :
using UnityEngine;
using System.Collections;
using Opsive.ThirdPersonController.Wrappers;
public class Damage : MonoBehaviour {
int health;
Healthbar healthbar;
void Start () {
yourCharacter.GetComponent<Health>.CurrentHealth.
healthbar = FindObjectOfType<Healthbar>();
if (healthbar == null)
{
Debug.LogError("I am hit!");
}
}
void Update () {
}
}