Escaping friend zone?

Have any of you been friend zoned by a guy you were talking to, but then brought back out of the friend zone? Because I was talking to a guy that goes to my school everyday for a few weeks and he liked me and I liked him, but when I confronted him about something too soon (something flirty that he did), he all of a sudden wanted to “just be friends”. It was confusing for me and my friends because he definitely liked me. Ever since he said that, he’s still been kinda flirty but we obviously don’t message anymore. I realize now that I shouldn’t have done that, because it intimidated him. Thoughts?