How would I make a raycast blacklist parts

I’m trying to do something with raycasting, but how would I make it blacklist parts?

I know that this code will blacklist the player, but I want it to also blacklist parts.

local rParams = RaycastParams.new()
rParams.FilterDescendantsInstances = {plr.Character}
rParams.FilterType = Enum.RaycastFilterType.Blacklist

Thanks!

rParams.FilterDescendantsInstances = {plr.Character, partYouWantToFilter}

3 Likes

Add the parts to the FilterDescendantsInstances array.

{plr.Character, folderOfParts, model, part1, part2} -- etc
1 Like