Be better looking, I guess?
Obviously I don't know what you look like, but if you're being confident, friendly etc and not having success, I'd say it's your looks letting you down.
After all, for someone to be a "friend" to a girl, looks don't tend to matter much (people will still care a bit of course, even subconsciously), just personality. Whereas to be a boyfriend, looks and personality both matter.