How to make npc not swim in water?

I have an npc and I just want him to walk around in water instead of swimming. The player should still swim, but the npc should just walk around in the water. The water is water terrain

Have you tried:

Humanoid:SetStateEnabled(Enum.HumanoidStateType.Swimming, false)

?

It still swims, i put it in a server script like this

local Humanoid = script.Parent.Humanoid
Humanoid:SetStateEnabled(Enum.HumanoidStateType.Swimming, false)