My health bars image.fillAmount doesnt change.

Im making a health bar and in the update function I set the image.fillAmount to be a variable I created. For some reason the health bar stays at 100 %. Can you tell me please why this happens please!
Health_bar script:
using UnityEngine;
using UnityEngine.UI;
using System.Collections;

public class Health_bar : MonoBehaviour
{
    public GameObject Enemy;


    // Update is called once per frame
    void FixedUpdate()
    {
        float EnemyHealth = Enemy.GetComponent<Enemyscripts>().Health;
        Image image = GetComponent<Image>();
        image.fillAmount = (EnemyHealth);
        Debug.Log("Health : " + EnemyHealth);
    }
}

By the way the GetComponent().Health is a variable in another script. Also the log is displayed with updated health every time health is lost. I tried Update() function but it didnt work either.

Image Type has to be “Filled”, otherwise the fillAmount will be ignored and always be considered = 1.

image.fillAmout takes arguement between 0 and 1. I bet your EnemyHealth is value between 0 and 100 so you need to divide it by one hundred:

image.fillAmount = (EnemyHealth)/100;

The fillAmount needs to be a value between 0 and 1, are you setting it using a percent? 50 for example would always be above 1.

I fixed the problem my self. I forgot to divide my EnemyHealth by 100.
public class Health_bar : MonoBehaviour
{
public GameObject Enemy;

     // Update is called once per frame
     void FixedUpdate()
     {
         float EnemyHealth = Enemy.GetComponent<Enemyscripts>().Health;
         Image image = GetComponent<Image>();
         image.fillAmount = (EnemyHealth/100);
         Debug.Log("Health : " + EnemyHealth);
     }
 }