Yes, the Saudi Arabian government played a role because the terrorists planned the attack in their country. The government there knew who the terrorists were and they didn't get them out of the country or alert other nations of the terrorists. Saudi Arabia is a country that executes people for adultery, they could have did something to stop the terrorists. They aren't the terrorists, but they did harbor them.
Yes, the Saudi Arabian government is partially responsible for the 9/11 attacks. There is a longstanding relationship involving the U.S. and the Saudi Arabian government based on the extraction of oil in the middle east. The Saudi Arabian government has been made wealthy as a result of its relationship with engineers in the U.S. and the technology supplied for the extraction and sale of its oil resources. Together the Saudi Arabian government and the U.S. have brought the east and the west together for the purpose of commerce. It is the fault of all parties that they have done in such a dysfunctional manner culturally. There should be no commercial involvement if it threatens the lives of innocent people. Therefore the 9/11 attacks and any act of aggression between the middle east and the U.S. is partly the responsibility of the Saudi Arabian government that profits from the world wide sale and distribution of oil.
The Saudi Arabia government may have given the Taliban safe harbor Otha e supported them financially in some way, but they did not help to plan or organize the attacks themselves. This was solely done by the attackers and other members of the Taliban, anything else is purely circumstantial and coincidental.
Saudi Arabia tries to distance itself from terrorist organizations, It is a fairly rich country with fairly rich citizens, so they have no reason to be disgruntled. They are not terrorists, so no, they are not to blame for the 9/11 attacks on the United States. The people to blame are those that actually did it.