How would I add multiple collision groups to RaycastParams?

Hello, so I’m trying to make my raycast be able to filter through multiple collision groups. i’ve tried looking at different posts but couldn’t find what I wanted. This is my script. Is there any way I can make it filter through multiple collision groups?

local Part = script.Parent
local Blacklist = RaycastParams.new()
Blacklist.FilterType = Enum.RaycastFilterType.Blacklist
Blacklist.CollisionGroup = "Cool group"
local Result = workspace:Raycast(Part.Position, Part.CFrame.LookVector * 1000, Blacklist)
if Result then
	print(Result.Instance)
else
	print("no")
end
1 Like