Detecting If User Is In Water

Sorry but there is something else useful to this subject

U can make this get parented to the head or humrootpart and it will say if its touching surface or fully submerged (read only)

Example drowning script in StarterCharacterScripts
(dont question the inefficiency its just example)


local character: Model? = script.Parent

local submergedTime = 0
local maxSubmergedTime = 5

if character then
	print("Character exists.")
	local head = character:WaitForChild("Head")
	local humanoid = character:WaitForChild("Humanoid")
	local buoyancySensor = Instance.new("BuoyancySensor", head)
	while task.wait(0.1) and humanoid.Health > 0 do 
		buoyancySensor:Destroy()
		buoyancySensor = Instance.new("BuoyancySensor", character:WaitForChild("Head"))
		if buoyancySensor.FullySubmerged == true then
			print("Submerged")
			submergedTime += 0.1
		else
			print("Not submerged")
			submergedTime = 0
		end
		if submergedTime >= maxSubmergedTime then
			print("Drowned!")
			humanoid.Health = 0
		end
	end
end

(i know ur not trying to make drowning script im just saying this as example)