For i, v in pairs with module scripts

So i’m trying to get this to work but I get no errors whatsoever, I don’t even know what’s wrong with the script, because I been trying to fix this problem for like 2 hours and I still haven’t come to a solution, please help.

Invoke:

Module:
afbeelding

Check:

Finalize:
afbeelding

The problem is when it finalizes it, it doesn’t put the class 1 on true even I do have it inside my table.
Has anyone a solution to fix this problem because I can’t figure it out.

Try this for the server script that returns the table:

if Whitelist[player.UserId] then

    return Whitelist[player.UserId]
else
  return {}
end
1 Like

Bruh, after 2 hours I only had to add [player.UserId]

:expressionless:

Thanks for the help though.

1 Like

I’m glad it works :slight_smile: ! In the future I would recommend adding print statements. On the client’s side, you could print what “RemoteFunction” returned, and you could also print what i and v in the for loop. Adding those prints you could quickly find the error and fix it.

1 Like

I mostly use prints only if something doesn’t work right, so I can know where the script has gone gorilla mode.

1 Like