C# Reload Script

Hi guys i need help with coroutine for reload delay… I really don’t know how to make a Coroutine, can you help me please? :slight_smile:

void Reload()
	{
		reloading = true;
		currentWeapon.wepTransform.animation.Play(currentWeapon.reloadAnim);

		count = 30;

		reloading = false;
	}

Try this:

IEnumerator Reload()
	{
		reloading = true;
		currentWeapon.wepTransform.animation.Play(currentWeapon.reloadAnim);
        yield return new WaitForSeconds(1.5f);
		count = 30;
		reloading = false;
	}

You will call it:

StartCoroutine(Reload());