you can access the target filters using TargetFilters property.
That property has these methods to change the filter:
-- Adds a new instance to the list of instances the raycast ignores
mouse.TargetFilters:Add(descendant: Instance): nil
-- Sets the list of instances which will be ignored by the raycast
mouse.TargetFilters:Set(instances: {Instance}): nil