Hello! This is kind of following up with my last question about the password gui, anyway I get that it's unsecure and all but it's a test. Anyway, I've got a table. Here's it:
local Keys = {
"Key1",
"Key2",
"Key3"
}
And with the TextButton and TextBox, I have this script under the TextButton:
script.Parent.MouseButton1Down:Connect(function()
for _, Key in pairs(Keys) do
if script.Parent.Parent.TextBox.Text == Key then
script.Parent.Parent.OutputBox.Text = "Key activated successfully!"
else
script.Parent.Parent.OutputBox.Text = "Incorrect key, please try again!"
end
end
end)
The issue I am having with this is Everytime I type in a key from the table such as Key1, or Key2, it doesn't work. But Key3 does. Can someone please help explain this to me?

2 comments
Thank you very much TheBigBro122
You're welcome