using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class shock_wave_2 : MonoBehaviour {
part_Hellth hp;
[SerializeField]
int hit_hp = 20;
private void OnControllerColliderHit(ControllerColliderHit hit)
{
if (hit.gameObject.name == "part")
{
hp = hit.gameObject.GetComponent<part_Hellth>();
hp.HP = hp.HP - hit_hp;
}
}
}
it gave me no Errors but part_Hellth.HP did not go dawn.