Move on Collision

Hi,

i want to push a Cube with a Player, but only if he touches it (2.5D Game).
Problem is the cube moves at start, even when i set bool to false at start. What i am doing wrong?

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Pushable : MonoBehaviour {


    private bool collided;

    // Use this for initialization
    void Start () {

        collided = false;
       
    }


    void OnCollisionEnter(Collision col)
    {
        if (col.gameObject.tag == "Player")
        {
            collided = true;
                Debug.Log ("Yes");
        }
    }

    void OnCollisionExit( Collision col)
    {
        if (col.gameObject.tag == "Player")
        {
            collided = false;
                Debug.Log ("No");
        }
    }


    void Update ()



    {
        if (collided = true)
        {
            transform.Translate (Input.GetAxis ("Horizontal") * Time.deltaTime, 0f, 0f);
        }
   
    }

}

You’re assigning “true” to collided here. This should be ==, which compares them. (You could also skip the " == true" entirely, and just say “if (collided)”, because collided is a bool)

Pretty much as @StarManta said it’s just a syntax error.
I usually just do if (variable) { // stuff } with Boolean variables and you could also do if (!variable) { // if not colliding } else { // colliding } to make things easier for you.