First create empty gameobject in hierarchy then click on gameobject (it was created empty) then drag and drop script into gameobject. Then click on like buttons, slider,...etc . Then scroll down on inspector window then click on + icon drag and drop gameobject then click on function arrow like ^ but down then click on script name display and then click function name which will play when click on button. Note(my English language is not proper so you understand).