Show/Hide objects with raycast

The picture you replied at 678GUY the only thing missing is before the flip flop cast it to your button first, if it is a success then proceed to setting visibility if it returns fail do not do anything.