Disclaimer: I do not know weather or not to put this into building or scripting support, please tell me if I should move it else were.
Problem: I basically have a container that moves underwater with the player inside of it (A Submarine). However when it is in the water, it fills with water and you can only swim around, I want the player to walk around in the submarine while it moves in a non set direction. I just want ideas, I dont really care if you have 1000% tested them out or not. I am an experienced coder and can do a lot so random ideas are welcome too!
Criteria: I dont care what solution you come up with as long as the player isnt swimming. there can still be water in the submarine (But it would be cool if there wasnt any). Thanks!!!
That said, the most common and likely easiest solution is to not use roblox water and instead script your own. Won’t look as good, but it makes it easier to control when the character is swimming. Glass and transparency can work in conjunction with that to hide being in water if you’re smart about it.
The other potential solution is to make the roblox water just a thin layer at the surface, depending on if it’s meant to be used for any other interactions. Less ideal but functional.
For your submarine, you’d probably want to have some code that connects to RunService.Heartbeat that checks if the character is inside (then if they are disable the swimming state).