So I wanted to make this fire blast that tracks the mouse hit position, but I do not want it to hit a part in the workspace, only the sky box. I tried doing this -
spawn(function() for i, v in pairs(game.Workspace:GetChildren()) do if v:IsA("Part") then Mouse.TargetFilter = v elseif v:IsA("MeshPart") then Mouse.TargetFilter = v end end RunS.Heartbeat:Connect(function() if CanControl == true then GetMouse:FireServer(Mouse.Hit) end end) end)
But it didnt blacklist anything it still hit all of the items in the workspace.
You can use rays to help. Instead of just a normal ray, you can use " :FindPartOnRayWithIgnoreList"
Here is the link to the website for it, it explains how you can use it, and etc. https://developer.roblox.com/en-us/api-reference/function/WorldRoot/FindPartOnRayWithIgnoreList
Let me know if you need help!