Robin Williams wanted to be part of the Harry Potter movies, but a casting rule prevented him from joining the franchise.