A surgical system comprising a housing assembly, a shaft extending from the housing assembly, a closure system, an end effector extending from the shaft, and a rotation system is disclosed. The housing assembly comprises a motor. The end effector is configurable in an unclamped configuration and a clamped configuration. The end effector is moved into the clamped configuration by the closure system. The end effector comprises a staple cartridge and a firing member. The staple cartridge comprises a plurality staples. The firing member is configured to move through the staple cartridge and deploy the plurality of staples. The rotation system is configured to rotate the end effector about a rotation axis when the end effector is in the unclamped configuration and prevent the end effector from rotating about the rotation axis when the end effector is in the clamped configuration.