Older homes can be fine or in need of a lot of deferred maintenance. The simple answer is get the home thoroughly inspected by a very experienced and licensed inspector. Ideally the roof will have already been replaced and the plumbing and electrical will be in good shape. After that, bathrooms and kitchens are the most common place to find issues due to leaks.
A great local agent can tell you which builders had a good reputation 20 to 30 years ago and which ones didn't. Find a great agent and you'll have a huge help in making a great decision.