the title pretty much explains it. how to make a ray that only detects water?
i have tried this so far:
local origin = script.Parent.Parent.PrimaryPart.Position
local destination = script.Parent.Parent.PrimaryPart.Position - Vector3.new(0,script.Parent.Parent.PrimaryPart.Size.Y,0)
local direction = destination - origin
local params = RaycastParams.new()
params.FilterType = Enum.RaycastFilterType.Whitelist
params.FilterDescendantsInstances = {}
params.IgnoreWater = false
local results = workspace:Raycast(origin,direction,params)
but it doesnt return anything