Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

[Solved] Is it possible to detect if water is under a part?

Asked by 1 year ago
Edited 1 year ago

Is it Possible to Detect Terrain Water using something or using a Ray? If you can, Can you show how to do it? (Thanks in Advance)

Edit: Thanks for anybody trying to Answer this but found a soultion now

local ray = Ray.new(char.HumanoidRootPart.Position, char.HumanoidRootPart.CFrame:vectorToWorldSpace(Vector3.new(0, -5, 0)) )
    local hit, position, normal, material = workspace:FindPartOnRay(ray,char)
    if material == Enum.Material.Water then
      warn("In Water")
    end

Answer this question