-- Raycasting function

local raycast = function(character, raycastOrigin, raycastDirection)
    
    local params = RaycastParams.new()
    params.FilterDescendantsInstances = {character, bloodCache}
    params.FilterType = Enum.RaycastFilterType.Blacklist
    params.IgnoreWater = true
    
    local raycastResult = workspace:Raycast(raycastOrigin, raycastDirection, params)
    
    if raycastResult then
        return raycastResult
    end
end
