The issue I currently have is regarding table indexes. I use GetChildren() function to get a table, but I also want to check if the said index exists within the table or not. If so, the code executes. The thing is, if I use this method in the same IF statement, it only fires the first given condition that is TRUE (which makes sense obviously, but I want to check if other given indexes exist as well within the same block of code or statement.) I have found a way to check if an index exists, but to me, it's quite inefficient. Maybe looking at a code will help you understand what I am trying to achieve.
To clarify, this is a model, which has 6 members, so code in line 11 doesn't execute!
local Model = script.Parent:GetChildren()
if Model[1] ~= nil then
print("Test1")
end
if Model[2] ~= nil then
print("Test2")
end
if Model[7] ~= nil then
print("Test3")
end

1 comment
you can do #Model to get the number of values in the table and only use certain indexes if they're less then or equal to the #Model