Type or namespace not found: Slider

I’ve used two similar lines of code for two different scripts, but one works and the other doesn’t. My slider is the one giving me the error code, but I don’t see any differences from the other script.

using UnityEngine;
using System.Collections;

public class EnemyHealth : MonoBehaviour {
	public int startingHealth;
	public int currentHealth;
	public Slider healthSlider;
	public AudioClip Hit;
	public AudioClip death;
	public GameObject Explosion;

	AudioSource enemyAudio;
	EnemyMove enemyMovement;
	bool isDead;
	
	
	void Awake()
	{
		enemyAudio = GetComponent<AudioSource>();
		enemyMovement = GetComponent<EnemyMove>();
		currentHealth = startingHealth;
	}
	

	public void TakeDamageEnemy(int amount)
	{
		currentHealth -= amount;

		healthSlider.value = currentHealth;

		enemyAudio.clip = Hit;
	
		enemyAudio.Play();
	
		if(currentHealth <= 0 && !isDead)
		{
			Death();
		}
	}
	
	void Death()
	{
		isDead = true;

		enemyAudio.clip = death;
		Instantiate(Explosion, transform.position, transform.rotation);
		enemyAudio.Play();
		enemyMovement.enabled = false;
		Destroy(gameObject);
	}

}

As detailed at the top of the manual page, Slider is in the UnityEngine.UI namespace:

So you need to add:

using UnityEngine.UI;

Slider inherits from UI.Selectable

Add this to the top of the script:

using UnityEnigne.UI.Selectable;