This would depend on it's size I assume and where the torpedoes hit.
If it is hit at it's rudder/screw section it definitely should come to a halt or at least be vastly reduced in it's maneuverability.
If it is a larger ship that can sustain some damage and is hit on the side it might as well sail on for a while. But the flooding would take it's toll too after a while. Again, this depends also on the ship's size.
Then again, it might also be a constructional issue. A ship that is able to close some doors leading to the flooding area would prevent further flooding and might get away while one that has larger compartments without seperating doors in between would be slowed down or might even capsize.
And if the whole that is caused by the detonation of the torpedo lies halfway above the surface is also not as bad as if it's full amount is under water and water can get in at maximum amount.
Only some of the relevant issues, I'm sure others here can tell you even some more