How to do a swim system like SharkBite?

Hello, There have been posts like this before, but they don’t work for what I need, and leave several things unanswered.

Basically, what I have been searching for is a custom swim system, similar to SharkBite. In this system, the character swims in water like normal, but the “Shark” isn’t affected by roblox’s swimming in the same way. Let me explain more. What I currently have is when the player spawns as the “Shark”, they turn into a custom Character, but the “Shark” always goes head-down when swimming, just as a normal player would. Is there a way to get rid of this, while still keeping the normal water properties? To clarify, I need the shark to still be able to swim, but not to go face down when moving.

My current code:

local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:wait()
local hum = char:WaitForChild("Humanoid")

hum:SetStateEnabled(Enum.HumanoidStateType.Swimming, false) -- this fires when a gui button is pressed, that turns the player into a shark morph. However, by doing this, they can't swim at all, and simply sink.
--How would I disable ONLY the leaning forward part of swimming, or is it not possible?

A different solution I tried is by creating a custom swim animation, where the character was at a 90 degree angle (to counter the leaning forward part of swimming), but this glitched and backfired terrible (shaky movements, player getting flung around, etc)

I don’t need the whole swimming system, just a few pointers and answers about how to go about this. Thanks!

Why not build the shark character ‘standing up’ so the normal swim animation lays it on it’s stomach?

1 Like

I have tried this too, but it didn’t seem to work right (i.e the swim animation still seemed glitchy and finnicky), I will continue testing this concept though. Thanks for the response! Do you know of any ways through code I could go about doing this?

I’m not much of a coder so no.
Is the issue when the shark stops swimming and rests that it tries to ‘stand’ in the water?

1 Like

Yeah! I’ve thought about keeping the shark continuously moving, so it wouldn’t ‘stand’ in the water, but that seems to be tough for mobile users to control (Sharkbite on mobile is pretty tough). Do you have any other suggestions?