People keep repeating that, and they don't really care if it is accurate.
Cadets at the Citadel took it upon themselves to fire at "Star of the West", which was not a "troop transport ship", it was a cargo ship carrying provisions.
These cadets were not part of the Confederate Military chain of command, and they did slight damage to the ship.
But if you are going to say whoever shot first caused the war, then I will inform you that Union soldiers fired at Florida Militia before the "Star of the West" incident even happened.
When someone is shooting at you, sane people don't waste a lot of time contemplating relative affiliations or ideology.
It surprises me not that you are oblivious to this important point.
There was no Confederate military chain in January 1861. At the time The Star of the West was fired on, South Carolina was the only seceded state (Mississippi seceded later in the day). The cadets were at Fort Moultrie by invitation of the state of SC which had seized the fort after it was evacuated by Federal troops and they were engaged in training.
They fired on the Star of the West by order of Major Stephens who had been instructed by Governor Pickens to fire on any ship flying United States colors that tried to enter Charleston harbor.
The cadets were not kids acting on their own. They fired on The Star of the West by order if their major who was under instructions of the South Carolina governor.