animator boolean

Hello
I want to tigger a boolean to switch an animator state
Obviously it’s too late and I can’t find the answer & am crosseyed with code:

using UnityEngine;
using System.Collections;

public class mouseTrigger1 : MonoBehaviour {

public Animator myAnimator;
	public bool myBool;
	
	void Start () {
		GetComponent<Animator> = myAnimator;
	}


	public void OnMouseUp()
	{
		if (myBool == "false") {     
			myAnimator.SetBool(myBool, true);
		} else
			myAnimator.SetBool(myBool, false);
	}
}

symbol “” mean type string, so you just need to remove it. it will work!

using UnityEngine;
using System.Collections;

public class mouseTrigger1 : MonoBehaviour
{
    public Animator myAnimator;
    public bool myBool = true; //recommend adding initial value

    void Start()
    {
        myAnimator = GetComponent<Animator>();
    }

    void OnMouseUp()
    {
        Debug.Log("M.U.");
        myBool = !myBool;

        myAnimator.applyRootMotion = myBool; // change here to make your script short and clear
        if (myBool)
        {
            Debug.Log("if is false");
        }
        else
        {
            Debug.Log("else");
        }
            
    }

}

I am not sure what kind of stuff you want to change,
so I use applyRootMotion to be example.

Thanks @say_forever
But I m still getting errors

for:

	GetComponent<Animator> = myAnimator;

Assets/Scripts/mouseTrigger1.cs(10,17): error CS0131: The left-hand side of an assignment must be a variable, a property or an indexer

&

	if (myBool == false) {     
		myAnimator.SetBool(myBool, true);

Assets/Scripts/mouseTrigger1.cs(17,36): error CS1502: The best overloaded method match for `UnityEngine.Animator.SetBool(string, bool)’ has some invalid arguments

&

		myAnimator.SetBool(myBool, false);

also gets this error:

Cannot connect “bool” expression to type “string”