how to make buttons response to stay clicking

just as the title says, I have tried all available event triggers on a experimental button but nothing worked the way I desire , so I want really your help on that issue , my game player object mainly depend on that…
for more details - I have tried on click with is default in the button it does not work so I deleted the component and tried to add event trigger thing which also didn’t help me, so please help me figure that out

You have to do like
on OnMouseDown or PointerDown you have to make a bool true
then OnMouseUp or PointerUp you have to make a bool false
now in the Update untill the bool is true then you should execute the code .

bool clickState = false;    
    void Update(){
       if (clickState){ 
       // Do Stuff here 
     // Now call this methon on EventTrigger PointerDown & PointerUp and set the state "True" and "False" respectively
    void SetButton(state)
     clickState = state;