hello, i have own data module which contains game data and functions to read/write it, but there’s problem:
function to get data doesnot work with “HeistData” table, but it exists, while it does work with “HeistProgress” (it exists too)
because youre defining a function with : when the function doesnt reference the self variable, which leads me to believe you have no idea how modules or “oop” work in luau, which could be the source of your error.
This is happening because you checked with a value false, try checking the table with _type_of_police
This line is at fault in this case, because when you check HeistData, _is_zombies, the value is false, thus not meeting the condition, replace it with module[datatable][property] ~= nil
I dont know because you provided no context. With the little context I had, what I said was correct. If you dont want suggestions and constructive criticism, stay off the forums and maybe developing isnt for you.