I have a MonoBehaviour script which have slots for buttons to act as a vehicles gas pedal and break pedal but i am unable to drag the button object on those slots.
public Mybutton gasPedal;
public Mybutton brakePedal;
public Mybutton leftButton;
public Mybutton rightButton;
It shows that black stop sign when i drag over it. Already checked if there is another script with same name, also tried adding component to the object.

The issue was resolved with the help of derHugo's comment. I had an script named
Mybuttonwhich i had to add as component to the button object.