Ok to whom? Hit on how?
If they are your subordinates (as in you work together) I would say no, that’s not ok.
If they’re staff somewhere you are visiting, I’d say that’s almost always creepy. They’re working, not out looking for dates. There’s not an inherent power dynamic though, and some context clues might show you it is acceptable.
The how is important. If you’re grabbing asses or wolf whistling that’s creepy. Asking someone if you can take them out for coffee or something isn’t inherently creepy.