Hi I am begginer and dont know how to say in this C# script word AND. Can somebody please help me? thanke you.

if (Input.GetKeyDown(KeyCode.E) & DashVelocity = DashVelocityYes)
{
transform.position += transform.forward * Time.deltaTime * movementSpeed * DashVelocity;
transform.position += transform.up * Time.deltaTime * movementSpeed * DashVelocity;

            DashVelocity = DashVelocityNo;

            StartCoroutine(DashDelay());
        }

Its && (or & for a bitwise and) I think you want && though.


Also = is the assignment operator not the equality operator i.e. ==.


So it would be:

if (someBoolsTrue && someVariable == someValue) { ... }