Raycast Ignore List does not ignore parts in a table

I am trying to setup an ignorelist by creating a table then inserting the descendants of the objects into that table.
Example:
local ObjectTable = {}
table.insert(ObjectTable,workspace.Live:GetDescendants())

However I am getting the unable to cast value to object error. Unable to cast value to object any ideas?

The point of the table is so that I can insert more than 1 descendant variable

Because you are inserting a table into your table. A raycast can’t ignore a table. It can only ignore instances.

Just do local ObjectTable = workspace.Live:GetDescendants()

The point of the table is so that I can insert more than 1 descendant variable

Ok so just add on to that table by doing table.insert(ObjectTable, NewObject)

2 Likes

:slight_smile: i love you man ty

Doesn’t the ignore list already ignore descendants? You could just write table.insert(ObjectTable, workspace.Live)

1 Like

OOH THAT’S WHAT YOU GUYS MEANT, THANK YOU MAN. incapaz said it first so I’ll pick him as the solution; however thank you.

1 Like