Raycast breaking going over blacklisted part

I’ve blacklisted these parts but whenever it hits the part the raycast doesnt get a result
https://gyazo.com/cb4a7c11a19804b4039250a3b62b844a

local function getblacklistedparts()
	parts = {plr.Character, workspace.DriptorchStuff}
	for _, i in ipairs(workspace:GetDescendants()) do
		if i:IsA("BasePart") and i.Name ~= "Terrain" then
			if i.CanCollide == false  then
				table.insert(parts, i)
			end
		end
	end
	return parts
end 

		local origin = script.Parent.Handle.Position
		local direction = (mouse.Hit.p - origin).Unit
		blacklistedparts = getblacklistedparts()
		params = RaycastParams.new()
		params.FilterType = Enum.RaycastFilterType.Exclude
		params.FilterDescendantsInstances = blacklistedparts
		local result = workspace:Raycast(origin, direction*30, params)
		
		
		
		activated = true
		line += 1
		lastplaced = result.Position
		script.Parent.Place:FireServer(result.Position, line)

ive checked and it is blacklisted so im really confused, ive never had this happen to me before

For now ive turned off canquery which works, but a different solution would be good for future reference

Blacklist used to be used for items you don’t want recognized by the raycast. Sounds like you are thinking about the Whitelist.
This Raycasting link gives the new parameters as “Include” and “Exclude” now.

Oh, ususally it would go through it for me. I also meant to say exclude but i said blacklist cause thats what it used to be before it got deprecated

that would be the best solution if those parts aren’t intended to trigger anything

Yea, its meant to go through those parts weird how it doesnt do that anymore because in my past projects with raycast it does go through excluded parts

I’m confused. You said it’s breaking and not going through blacklisted Parts.
Did you mean to say it does get a result?

what im expecting it to do is to go through the blacklisted part and hit the ground instead,
but what its doing is not getting a result at all

Oh, so it’s not seeing the ground? That’d be an important detail.

Is the Terrain in your excluded list as well?

only things i did were those parts and the character,
i dont think I blacklisted the terrain because the raycast gets a result on the terrain
theres a chance its just a one off bug i guess