Is it possible to make a waterborne npc with default pathfinding? (Example below)

Hello everyone, I am wondering whether it is possible to make a waterborne npc with default pathfinding. For example, could you use Roblox pathfinding to make a shark chase a player? (This would be difficult, because the shark would have to go through the default terrain water). If so, how would I do it? Thanks

1 Like

It is totally possible to do so. Just use normal pathfinding scripts.

I do recommend that you do not use terrain for anything else other than water, since the waypoints do glitch and go up by 100 studs randomly.

1 Like

Hmm, doesn’t seem to work. My script is

path:ComputeAsync(Shark,part)
			local waypoints = path:GetWaypoints()
			if #waypoints >= 1 then
				if #waypoints < 10 then
					humanoid.WalkSpeed = 18
					humanoid:MoveTo(waypoints[#waypoints].Position)
				elseif #waypoints < 40 then
					humanoid.WalkSpeed = 3
					humanoid:MoveTo(waypoints[4].Position)
				else
					--do nothing
				end
			end

It can chase the player if they stay at the water’s surface but it doesn’t work if they go under.