States cannot pass laws that are in legal opposition to Federal Law. If the issue goes to court, Federal Law supercedes local law. There are instances where you see States ignoring Federal Law, for instance marijuana, but if the Feds chose to challenge the States, the Constitution would provide the framework to strike down the local law in favor of the Federal Law. This is what is called Federalism, and found in the 10th Amendment.