Help me!!!

Hi, I’m developing a video game set in the sea, does anyone know how to create a script for swimming underwater? I use C #.

What you are asking for isn’t a simple thing, so you should start researching, attempt something, and then ask questions about your attempt.

Some thoughts to consider to narrow down the search:

What type of physics? Cartoony Mario-style, or realistic?

What type of input? Do you want to make the player button spam? Or just push the stick in the direction they want to swim?

2D or 3D game?

Arcadey or realistic simulation?

Sci-fic worlds where the fluidic density may be different?

As you can see there’s a lot to consider before you even start scripting.

The forum is good at answering specific questions, such as you have your underwater script, but you keep sinking when you expect to float. Here is the full script, here is what it is attached to, etc. The forum is not so good about providing tutorial level instruction like your question appears to be asking.