Information
Hello my name is Sandessat, and I’m new to LUA.
Recently I asked myself, can I make a login system with Roblox Studio through tables?
I tried, but when I did, something went wrong.
Video
What I’m trying to say in the video is that when I put the FIRST word of the table in the textbox I get that it’s FALSE, but it should be TRUE because it’s in the table.
Code
-- IMPORTANT TABLES
local customersTBL = {"AA", "BB"}
-- VARIABLES
local testingLabel = script.Parent.Parent.Parent.Parent.testingLabel
local inputTextbox = script.Parent.Parent.Parent.textboxFrame.textBox
-- SETTINGS
script.Parent.MouseButton1Click:Connect(function()
for i, value in pairs(customersTBL) do
if value == inputTextbox.Text then
testingLabel.Text = "Account Validation: TRUE"
else
testingLabel.Text = "Account Validation: FALSE"
end
end
end)
I don’t know if I’m wrong in the code or if I’m right, anything leaves your question or answer below and I’ll see it!