How To Disable UI Button -- Please Help

Hi,

I need some help about a ui button.

Ok, so I have created the button and it is working exactly the way I want after performing onPress but the issue is that I want to disable or deactivate the button after onPress so that once the button is clicked, it does not function any more.

I need help regarding this.

Thank you.
[import]uid: 121356 topic_id: 21353 reply_id: 321353[/import]

Try something like:

  
local buttonCheck = true  
  

Then on your touch event add before the button does anything:

  
if buttonCheck == true then  
  

Finally after your button does whatever it has to do add:

buttonCheck = false [import]uid: 23649 topic_id: 21353 reply_id: 84536[/import]