Just figured out to connect camera to a telescope with an adapter ,you have to have camera in manual mode or you will get a lens error message.
I'm new to astrophotography,i had my Nikon d3400 in auto mode,it was driving me crazy.
hope this helps someone.