if (Input.GetMouseButton(1))
{
anim.SetBool(“aiming”, true);
inputHandler.aiming = true;
}
else if (Input.GetMouseButton(0) && !inputHandler.aiming)
{
anim.SetBool(“aiming”, true);
mtranform.transform.forward = Camtran.transform.forward;
}
else
{
anim.SetBool(“aiming”, false);
inputHandler.aiming = false;
}
When I hold the left mouse button down it keeps using the if and else statements parts of the function. So it we’ll aim than set it to false and vice versa over and over again.