HumanoidWalkSpeed only affects swimming speeds left, right, and down. For some reason, the Roblox engine caps the upwards swim speed at 16 though.
I’m hoping to write a script to overcome this built-in limitation. What could be potential ways of working past this?
I could see a BodyVector working, but I’ve struggled to detect if the player is both swimming, and swimming upwards, and applying the vector correctly. Is there another approach here that could worth?
Well, for the detection, you could check if the HumanoidRootPart’s velocity is going higher or lower, if it is higher, then make sure to also check if the player is currently holding space (Or any input that makes the player jump), then apply the force upwards. Don’t know if this would work, but this is a way I would do it.
I would suggest the BodyVector method you previously mentioned for this. An easy was to detect if the player is swimming would be to use Humanoid:GetState() and UserInputService to detect if the player is holding space to swim up while underwater, and then applying an upwards force onto their character accordingly
If you set the BodyVelocity to a Vector3 with x and y being 0, and z = -200, the character will fly up until it hits the ceiling.
I’m not sure if there’s a way to detect when the player is swimming, but you could use a Vector3 with the x and y being the direction the player is moving, and the z being 0. However, in order to do that, the player would have to be moving the exact same speed at all times.