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

Can you run 2 or more ignore lists with FindPartOnRayWithIgnoreList?

Is it possible to run 2 or more ignore lists with FindPartOnRayWithIgnoreList, I tried everything i could think of.

Example:

workspace:FindPartOnRayWithIgnoreList(ray, list1, list2)

3 comments

0

I can't see why you'd need to. Why can't you put everything into 1 list?

0

Make a new list and combine the 2 lists in the new one, and put that inside of the function.

0

This gives me an error, "Unable to cast value to object"

1 answer

✓ Accepted answer

You could do something like this to combine two lists/tables into one.

local table1 = {4,5,6}
local table2 = {1,2,3}
for i,v in pairs(table1) do
	table.insert(table2,#table2 + 1,v)
end

for i,v in pairs(table2) do -- this just prints the components of table2
	print(v)
end

Output:

1

2

3

4

5

6

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