You also need to connect all unused inputs on the 74HC04 to either ground or Vcc. Don't just leave them floating.
And the 74HC04 is a static-sensitive chip, so if you've mis-handled it, (touched the pins with your fingers etc), there's a chance it's dead.
Also, as DrAzzy says, if you're only controlling one pin, a single transistor is all you really need. A hex inverter is only really useful if there are multiple pins being controlled.
My guess, (to quote DrAzzy), is this:- "Did you remember to connect the grounds?"