1. What year is your Z?
2. Did you check the fuse panel?
3. Typically, the problem you have is caused by the turn signal and/or the light switch. Many "how to" posts on switch repair here and on the internet.
4. Information:
http://woodworkerb.com/home/datsun-240z-rebuild/datsun-240z-multifunction-switches/
https://www.datsun-240z-upgrades.net/services/
https://fiddlingwithzcars.wordpress.com/2012/12/04/turn-signal-repair/
http://www.classiczcars.com/forums/topic/34330-72-240z-turn-signal-stoped-workining/
Rebuild_240Z_combo_switch.pdf