Unknown require: unsupported path | typechecking error


I have this weird typechecking error of Unknown require: unsupported path that I can’t seem to get rid of no matter what I do. (I also have Key 'Character' not found in table 'Enemy')
image
Any clue on how to get rid of these errors would be very appreciated. Thank you.

What is the Stats.Character table set to? It might not have an index called Character in it, so that is probably why it errors.

The stats parameter takes in two types of arguments, a table of the Enemy table type (shown below).image
or what the Enemy.new function itself returns.

So the Stats.Character table isn’t really solidly defined, it’s really either a table with Character in it or a table without character in it.

It’s because you are working in strict mode, and your table doesn’t have an index called Character in it.

The only recommendation I could give is either not to work in strict mode or to add Character = nil, or something along the lines of that into your table.