Custom (Submarine-Like) Character Move System?

Hello Devs,
I have recently encountered several problems with Roblox’s move systems (doesn’t work with my custom character). Roblox’s move systems works well on land, but in water. . . (See Video)
robloxapp-20210107-1127069.wmv (2.0 MB)
What I was wondering is: How would I go about making a custom move system? I have made it so once you spawn as the custom character, platform stand is enabled (so you can’t swim)

player.Humanoid.PlatformStand = true

Going off that, how would I make it so the player is ALWAYS moving forward, in the direction the camera is facing? Then, how would I go about turning the character left (A key), right (D key), Up (W Key), and Down (S Key)?
I have searched countless YouTube videos and devforum posts about a solution, but I cannot find one that works for me. I know I have to use UserInputService, but I am lost. I am an intermediate-level scripter, so I just need the bare bones or any pointers. Thank you for your help and time!

1 Like

I’m not too sure how to do it myself with code, but I think that games like SharkBite, High Tide, etc. can point you in the right direction. If you aren’t looking for direction, but maybe code, that’s all I can do for you.

1 Like

It seems the model of the shark aka the player points in whatever direction you look at. Most games like shark bite use first person which should solve this problem.
Unless you want it to be in a 3rd person movement system.

1 Like

I’m mostly looking for code suggestions or pointers, but thank you for the help!

That is definitely true, thanks for the pointer! However, Sharkbite on Mobile is really difficult to control, thanks for the aid!

1 Like

You can maybe make a custom gamepad controls for mobile player like simple, up ,down, left, right arrows.

1 Like

That might work, I’ll look into that, thanks!

1 Like

I’m not sure if this will help but it covers the :MoveTo() function on humanoids
Humanoid | Documentation - Roblox Creator Hub
Player | Documentation - Roblox Creator Hub

1 Like

I’ve looked into that already (I could add a welded part right in front of the shark, and repeatedly call :MoveTo(), but this seems like a large task on the game, when I tried it it got laggy). There probably isn’t a perfect answer to this topic, but I was hoping to save myself a week of laboring over this. Thanks though!

1 Like

Have you tried maybe body movers?

1 Like

I have, they are probably the answer, I’m just slightly stuck on how to pull it all together

1 Like

I found a working solution. Basically, what I did was set the camera to first person (like @Untoldthreat pointed out), then I applied a constant Body Force on the player, according to where the camera was looking. The code turned out something like this (this code is just a sample, not the real thing)

local Camera = workspace.CurrentCamera
while wait() do
	local Direction = Vector3.new(Camera.CFrame.LookVector.X,0,Camera.CFrame.LookVector.Z)*10000
	--game.Players.LocalPlayer:Move(Vector3.new(0, 0, -1), true)
	if not game.Players.LocalPlayer.Character.HumanoidRootPart:FindFirstChild("Forward") then


		local bodyForce = Instance.new("BodyForce")
		bodyForce.Parent = game.Players.LocalPlayer.Character.HumanoidRootPart
		bodyForce.Name = "Forward"
		game.Players.LocalPlayer.Character.HumanoidRootPart:FindFirstChild("Forward").Force = Direction
	else
		game.Players.LocalPlayer.Character.HumanoidRootPart:FindFirstChild("Forward").Force = Direction
	end
end

Hope this helps anyone working on a simple move system

1 Like

You should set the parent after naming the BodyForce to use up less resources.
Remember, always set the parent last.

Oop, I feel stupid for missing that, thanks!

1 Like