Basically, I want to create a water script for my game that works by seeing if their waist is low enough in the water and they cannot reach the bottom, they will start to swim. So if the player is walking in shallow water, they will not begin to swim and will just walk.
In the image above is a diagram sorta thingy about how it in theory works.
On the left is when the player’s waist is not low enough / the water level is high enough for the player’s feet to not reach the ground and begin swimming.
In my current water engine, I just make any humanoid inside of the Region3 detectors to become slow and stunned.