using System.Collections; using System.Collections.Generic; using UnityEngine; public class HealZone : MonoBehaviour { public GameObject player; void Start() { player = GameObject.Find("Player"); } void OnTriggerStay(Collider other) { if (player.GetComponent().currentHealth < 100) { player.GetComponent().currentHealth += 0.1f; } } }