Multiple correct code to key door does not work? am i doing something wrong?

Alright so hello! I’m helping a friend make a game, I am making a keycode door that whenever a player steps on an invisible Part a gui will duplicate it from its parent to PlayerGui who’ve stepped on it, so basically I need the code to have multiple correct codes, but it doesn’t work, Am I doing it wrong? please explain carefully as long as I understand it’s good because I am not a professional programmer.

there is a full script but I don’t want to reveal it, as it’s My friend’s game.
I want it to have multiple codes, It only works without this method:

if TEXT_BOX.Text == {"144", "153"} then

Help is appreciated thank you!

I get that you don’t want to reveal the code for your game, but that may be why your issue is happening.

In the line you provided, you are comparing a string to a table. You would need to do this:

if table.find({"144", "153"}, TEXT_BOX.Text) then
    -- code
end
1 Like

thank you, is there a more simple way to do this?

You could make a variable at the top of the script and define the table there then do table.find(variableName...).