Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to add more items to a RayCast's ignore list?

I am trying to add more items to a ray's ignore list to prevent it from getting the baseplate instead of what's really above it.

I am working on a tree jumping system and i want to use RayCast to make it easier for people to jump.

I already have the RayCast and everything, I just need to know how add another item (the baseplate) to the RayCast's ignore list.

Here's the code i have so far.

local torso = player.Character.HumanoidRootPart
		local ray = Ray.new(torso.CFrame.p, (CFrame.Angles(0,0,math.rad(90)) * torso.CFrame ).p*3)
		local ignore = game.Players.LocalPlayer.Character
		
			local part, position, thes = game.Workspace:FindPartOnRay(ray, ignore)

1 answer

✓ Accepted answer

in order to ignore multiple instances, you want to use FindPartOnRayWithIgnoreList(ray,list)

it accepts a table of items to ignore

This discussion is preserved as it was. New answers, comments, and votes are closed.