Radstar1
(Radstar1)
July 31, 2020, 5:12pm
#1
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
sjr04
(uep)
July 31, 2020, 5:16pm
#2
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()
Radstar1
(Radstar1)
July 31, 2020, 5:18pm
#5
The point of the table is so that I can insert more than 1 descendant variable
sjr04
(uep)
July 31, 2020, 5:18pm
#6
Ok so just add on to that table by doing table.insert(ObjectTable, NewObject)
2 Likes
Doesn’t the ignore list already ignore descendants? You could just write table.insert(ObjectTable, workspace.Live)
1 Like
Radstar1
(Radstar1)
July 31, 2020, 5:22pm
#9
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