How would I create an ignore list for this raycast:
local Origin = Character.LeftHand.Position
local Direction = (EndPosition - Origin).Unit * 300
local Result = game.Workspace:Raycast(Origin, Direction)
Before asking, I’ve already checked other posts and haven’t had luck. Please comment if you are willing to help only.
local raycastParams = RaycastParams.new()
raycastParams.FilterType = Enum.RaycastFilterType.Blacklist -- the ignore list type
raycastParams.FilterDescendantsInstances = {} -- put here things you want to be ignored
local Origin = Character.LeftHand.Position
local Direction = (EndPosition - Origin).Unit * 300
local raycastResult = workspace:Raycast(Origin,Direction, raycastParams)
if raycastResult then
print(raycastResult.Instance) -- The part hit
print(raycastResult.Position) -- The position where hit
print(raycastResult.Material) --The material of the part it hit
print(raycastResult.Normal) -- The surface normal
end