Mouse.Target and Transparent objects

Hello, with this post i would like to know how to make mouse.Target not ignore transparent objects?
Usually, it would go through them because they are invisible walls etc. In this case, i need it not to ignore specific transparent parts. How would i do this?

What you could do, is maybe put your Transparent Parts in a folder then change the Mouse.TargetFilter property to this:

Mouse.TargetFilter = workspace.IgnoreParts

The TargetFilter will ignore the parts & its descendants inside the folder

3 Likes

Thank you! I will attempt this tommorow as it is 5 am.

I have another last question. Since the Seperators will be spread around the map, could i also use this;

local Seperators = {}
for i, v in pairs(game:GetDescendants()) do
    if v.Name == "Seperator" then
        table.create(Sperators, v)
    end
end

Mouse.TargetFilter = Seperators

?

It would be table.insert() instead of table.create() but definitely use a folder instead as looping through your entire workspace would be incredibly inefficient

1 Like

Okay i will just do that then! Thanks