On space pressed >
>if PlayerIsSwimming <- boolean for if they are swimming
>> Player | Set Platform Y Vector to swimupvector (make sure it's negative)
With this, if your player is swimming when you hit space, their Y vector will go up that much.
Make sure your Y vector is negative if you want to go up. Positive Y vector = down.