Need help with Underwater Diving/Swim System

Hey there. I’m planning making a First-Person shooter that takes place underwater with divers and frogmen.
I’ve encountered a real problem. Using Default Roblox Terrain water I’ve noticed that it the animation really looks bad (Using R6).

What I’m asking is would it be possible to have a script where If you are underwater, if you (For example) press the “w” key play my own Swimming animations of swimming forward That I can animate myself?

If that’s not possible would it be possible to the the same thing but with flying in air?

3 Likes

This sound possible to me. You would want a way to detect that the player is underwater. That might be using a Region3 or some other method, such as raycasting. When they are underwater, you would want to play an animation when they are pressing W. You can detect their keypress using UserInputService. To play the animation, you will most probably want to look at the Animator class.

2 Likes