Most of the actual community in a music scene gets built outside the dancefloor. The smoking area, the queue for the toilets, the post-club walk to the bus. Here is the practical version of how to not be weird in those moments.
The opener
Ask about the night, not the person. "How are you finding the set?" or "Did you catch the warm-up?" Both invite a real answer without putting anyone on the spot. Skip the "where are you from" until later in the conversation.
The follow-up
Listen to what they say. Respond to it specifically. If they mention they liked a particular track, ask which one. People love being asked to share their taste.
The exit
When you want to go back in, just say "I am going back in, see you on the floor". Hugs or fist bumps are normal. Standing there awkwardly trying to extend the conversation past its natural end is not.
The thing nobody admits
Almost everyone in a smoking area is mildly anxious about social interaction. Knowing that other people are also mildly anxious is the most useful frame for not feeling weird yourself.
