I’m confused on this situation and need help?

So I accidentally hurt my guy friend’s feelings a couple months ago and I apologized but he’s been acting differently. But before that, his friends would tease him for liking me and they told me he did.

Awhile ago we got back on good terms and recently I gained some confidence and decided to asked him out but he told me he didn’t like me in that way which I was very confused about because he even mentioned us being together before.

And the other day I had walked past him and one of his friends said “Are you smiling because you just saw (My name)?” and he immediately said “What?” like he was scared he got caught or something. Like why is he acting like this?
I’m confused on this situation and need help?
Post Opinion