# If statement problems

**URL:** <https://forum.kirupa.com/t/if-statement-problems/114127>\
**Category:** Uncategorized\
**Created:** [June 25, 2004, 12:03am UTC](https://forum.kirupa.com/t/if-statement-problems/114127 "2004-06-25T00:03:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![un4given](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/un4given/32/320_2.png) [@un4given](https://forum.kirupa.com/u/un4given)\
**Post date:** [June 25, 2004, 12:03am UTC](https://forum.kirupa.com/t/if-statement-problems/114127/1 "2004-06-25T00:03:46Z")

</div>

aight  
i’m trying to use if statements but can’t get this thing to work  
i want to check if another button is visible on release of a button  
to determine what action to be taken.  
the ‘gotoAndPlay(“firstscene”,1)’ is just there as an outcome, will be changed later.

anyway this is the code i’ve got on the button i’m pressing.  
blobyellow2 is an instance of a button blobyellow  
is it because it’s an instance that it’s not working?

on (release) {  
if (blobyellow2.\_visible = true) {  
gotoAndPlay(“firstscene”, 1);  
}  
}

please help. i’m very tired ☹

edit:

sorry forgot to put what’s wrong with the code.  
it acts as though the statement is correct no matter if it is or isn’t.
