Data module doesnot work properly

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)

data:
изображение

function:

issue:

working example:

i dont see any reason why it doesnt working…

1 Like

can you share the whole module script, looks like youre using the : operator incorrectly.

eh… why i should to? other functions doesn’t take place in this, and end of the module data table is only ingame functions related

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

image

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

1 Like

if you don’t know what and how i use something, please don’t say anything related to it

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.

then why Emanuelecaja18 understood my issue? maybe its YOU should stay off forum? don’t act like youre smart as Einstein