Why do guys act like they like you but then again they don't want to be in relationship with you?

I like this boy we go to the same high school we been talking for months and we act/ and do what boyfriend and girlfriend do. So one day my friends brought it up how come we are not official right in front him all he could do is smile so I knew he didn't want talk about that in front of them so we went to a side and I ask the same question and he told me he's having some problems at home that he feel like he won't be a good boyfriend because I won't have his full attention and I was like okay I understand. Then weeks later I asked the same question this time he told me He's not ready for a girlfriend . I feel like He's pushing me away then again leading me on to believe we well be together one day . What should I do?