So, do lie detector tests have any legal weight like they do in movies and tv?
It depends on the state, but generally no. They are not foolproof and their reliability has not been completely determined.
Polygraph machines simply detect stress compared to a baseline while under interrogation, and so if you can answer questions without noticeable stress, you can beat the test. Such as if one were to practice giving a particular answer.
Source: google search for “polygraph inadmissible”