And in the IsTilePassable check, you first need to save the corresponding elements of the table in local x, y, and z, and then pass them to IsTilePassable.
And it is precisely because of this that the error "attempt to index a number" occurs. After all, creature[k] is just a number.
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________