Of course, there's no guarantee that family will visit you no matter where you are, be it in your own home or at a retirement home. Maybe you're asking the wrong question, though. Too few seniors think of how to make visits appealing or even enticing. Family will find it less appealing to visit you if you live in a dark, poorly kept apartment by yourself where there is "nothing to do" for your kids and grandchildren.
One of the advantages of moving into an excellent quality retirement home is that it is nicer for people to visit you there and to see you well taken care of, in a happy, sunny environment. A retirement home that is near shopping or any environment appealing for any other reason (nature trails, outdoor activities, local attractions, etc.) is more amenable for children and even grandchildren who (honestly, again) may not be interested in visiting you.
Ask your children what would make it appealing for them to visit
Too often seniors also impose their own interests or ideas of fun on their children and grandchildren. For example, you may be interested in museums but that may be the last thing your children or grandchildren want to do. Find out what it is they like then keep this in mind when choosing a residence that might be near activities or attractions they enjoy.
"My son and I came in to tour the place and right away he said, 'Mom, you're moving!'"