I have a “HealthBar” script and I need to reference the HP in another script. The HealthBar script is attached to a prefab. That prefab also has the Enemy script in which I want to reference the HP from. How would go about doing this
To get components which are attached to the same game object you can just call:
HealthBar myHealthBar = GetComponent();
I assume your using C#.