Script is losing component on runtime

I have script that controls animator. When I press play script loses component attachment. How to repair it?

Your code:

void Start () { anim = GetComponent(); }

Is setting the anim to heerself component, try delete that code:
If not works when deletes the code, change to this:

void Start ()
    {
        anim = GameObject.Find("postac (1)").gameObject.GetComponent<Animator>();
    }  // Make sure the name is exactly like the object in scene with the animator