Input.GetMouseButton

Hi there i have a major problem. I have created a melee system using ray-casting and i need it to cast the ray while animation is being played this works great. My problem is the Input.GetMouseButton method reading on the refrence after a long think i found that you must press the button then release then press again i need it to be just a press none of this press again jargon.

Within my melee system when the user presses the LMB i run a another method which is the melee systems main port of call for detecting hits and what it hit.

Is there anything other than this or am i doing something wrong i am 100% sure i am not i hope there is some sort of solution that someone can help with. here is some code that is within the update method

if(Input.GetMouseButtonUp(0))
		{
			attacking = true;
			animations.animation.Play("Down");
			CheckAnims();
		}
	}
	
	void CheckAnims()
	{
		if(animations.animation.IsPlaying("Down"))
			{
				if (Physics.CapsuleCast(point1, point2, radiusOfCapsule, direction, out hit, length))
				{
		            if(hit.collider.gameObject.tag == "Enemy")
					{
						if(attacking)
						{
							StartCoroutine(MeleeSystem());
						}
					}
				}
		      }
	}

GetMouseButtonUp/down means it sends 1 on the frame when you release/press the button.But the rest of the time it sends 0

GetMouseButton sends 1 on every frame you are pressing the button so as long as yuo keep pressing.

Your question is not so clear to me but maybe that is what you need.

I realised i needed a coroutine in the update function whether or not the attacking boolean was true if it was run the code. The reason it was not working was i was running code within the Mouse Event which only returns true for one frame.