SQL Server Management Studio (SSMS) can really trip you up. I was reminded of this the other day when I decided to script some database tables and put them in a second database. It seems really straight forward, you right-click on a Table and you can create a script in various places.
Days after doing this and after importing some data I noticed something strange. The data import was allowing duplicate data that I know I had a unique index set up to prevent. Turns out that (don't ask me why) SSMS does not have the option for scripting indexes turned on by default. Using the Tools->Options… menu I scrolled down and set it to true and then went about starting over. While you're at that option pane
you might as well check every setting that is false and make sure it is what you want.