Hello, basically I am making a gui that can be accessed if an administrator player had the right password. I have a table along the lines of:
local Keys = {
"Key1"
"Key2"
"Key3"
}
and I try to access it through a TextButton, and a TextBox but it doesn't work.
If I put 'Key1' in the TextBox for example (since it's in the 'Keys' table) and the script under the TextButton is:
script.Parent.MouseButton1Down:Connect(function()
if script.Parent.Parent.TextBox.Text == Keys then
print("Thingy worked lolz")
else
print("Thingy not worked lolzn't")
end
end)
It doesn't work. I am not the best Roblox LUA scripter and this code may be entirely wrong but it would be much appreciated if a fellow forum member were to help explain to me what I have done wrong and how to fix it. I feel it's something with the table and I may have scripted it wrong in the TextButton, but I don't know. Any and all help will be much appreciated, Thanks a bunch!

5 comments
ohhh thanks so much
No problem. Feel free to mark my answer as the answer to the question.
this is easily exploitable, i recommend server-siding the login.
ok so I understand it's unsecure, because this is just a test. Anyway I am having a problem. for my table Keys only Key3 works, and Key1, and Key2 dont work.
I edited it. You forgot the comma's on the Keys table.