Detecting if a character is touching water


I’m trying to detect if the player is partially submerged in water as I’m making a system for wading in shallow water (with a splash sound and effect etc) and I can’t figure out how.

I’ve tried looking it up but haven’t had any luck yet, could anyone please help?


raycast straight down from the players torso, and if the ray hits water then play the sound or change the SoundId of the footsteps sound.

That’s the first thing I tried. Didn’t work :frowning:

If the water is fairly even, and its position is always the same on the Y axis, you could compare the players HumanoidRootPart.Y. If it’s equal or below, they would be submerged in water.


And you could do HumanoidRootPart.Y - X, with X being a number, if you wanted to be more specific.

1 Like

Something like this should do it. You’ll have to experiment with how far down to cast the ray.

local ray =, Player.Character.Torso.CFrame:vectorToWorldSpace(, -3, 0)) 
local hit, position, normal, material = workspace:FindPartOnRay(ray,Player.Character)
if material == Enum.Material.Water then

:man_facepalming:i forgot that there was a material under findpartonray, I overcomplicated it… It works now, thanks.