2002 Hyundai Elantra reverse only works after setting for weeks then starts working again for a while then starts hard shifting in reverse then stops working reverse again
On a 20-year-old Hyundai it's a good bet the transmission is shot. As mentioned if you're lucky it might just be low on fluid. When was the last time it was changed and what does the fluid look like? Other than that you should have it scanned for transmission codes using a professional scan tool. As a last resort you could try doing a drain and fill of the fluid and adding some Lucas transmission additive.
It is 20 years old but only has 89,000 miles
I seriously doubt that mileage.
Even if true if the trans could still be bad after 20 years, but assuming the fluid is OK a pro needs to examine that transmission to see what's going on with it.
The car I purchased from an older couple that the wife never drove it barely and husband had his own car they purchased it brand new family frinds
Well if you're lucky it's just something like a hinky shift solenoid or the shifter out of adjustment but a mechanic needs to check it. Possibly our transmission guy here @dan has some direct experience with that trans and can chime in.
check your transmission fluid

