odd tailight issue??

I'm no electrician but my passenger side front turn signal has a similar promblem and it seems to be a bad wire cause if you turn the socket so the slack in the wire arcs upwards it works fine but when it stops working the wire is always sagging downward so i'm gonna try a new pigtail I guess good luck with yours