Edinburgh....double check your plane tickets

Beautiful city....the Scots are just salt of the earth good people.
The Castle is great....try to get a tour. They fire the cannons at certain times of the day so thats fun for the kids.
I don't know if the Hibs or Hearts are still playing, but might be worth checking their schedule if you have any sports fans in the family.
If you rent a car to go out and explore outside the city, rent it at the airport rather than in town....it's a lot tougher to get used to the driving on the outskirts of town than in the city proper.
St Andrew's is not a far drive....there is a putt putt just off the edge of one of the fair ways that the kids might like....if you do that, Anstruther's Fish & Chips in Anstruther (on the way) wins all the "best of" awards for theirs. There is also an old WWII underground bunker you can tour somewhere between Edinburgh and St Andrews.
There is a super old Joke Shop on the High Street that I went to as a kid and we took our kids to when we were there....loved by both generations.
Hiking Sir Arthur's seat is lovely if you want a hike (or "walk" as they say)
Get some ice cream and sit in Princess Street Garden to eat it.
Climb to the top of Scott Monument
You can visit the Whiskey Experience....not super family related but nothing bad....kids can learn the science behind it.