I am wanting to create a login in system. I have 2 textboxes and 1 text button that will help complete the function. I also have 2 tables that are incorporated. Now it doesn't display either the textboxes nor the textbutton. What am I doing wrong?
local Username = game.ServerStorage.PasswordArray
local Password = game.ServerStorage.Usernames
local textbox1 = Instance.new("textbox")
textbox1.Parent = screen
textbox1.Text = "Username"
textbox1.Size = UDim2.new(.25,0,1,0)
textbox1.Position = UDim2.new(.5,0,.5,0)
textbox1.FontSize = Enum.FontSize.Size14
textbox1.Font = Enum.Font.SourceSansLight
local textbox2 = Instance.new("textbox")
textbox2.Parent = screen
textbox2.Text = "Password"
textbox2.Size = UDim2.new(.25,0,1,0)
textbox2.Position = UDim2.new(.75,0,.5,0)
textbox2.FontSize = Enum.FontSize.Size14
textbox2.Font = Enum.Font.SourceSansLight
local textbutton = Instance.new("Textbutton")
textbutton.Text = "Submitt"
textbutton.Size = UDim2.new(.25,0,1,0)
textbutton.Position = UDim2.new(.85,0,.5,0)
textbutton.FontSize = Enum.FontSize.Size14
textbutton.Font = Enum.Font.SourceSansLight
local function = ()
if textbox1.text = Username[1] and textbox2.text = Password[1]
then do destroy.textbox1 and textbox2
else if textbox1.text = Username[2,25] and textbox2.text = Password[2,25]
then do destroy.textbox1 and textbox2
end
end
end

3 comments
http://wiki.roblox.com/?title=Scripting_Book
just compare both texts using the == operator and if you want them non-case sensitive, use :lower() on both strings print("password attempt" == "password value")
Mental note:Comment from ScriptGuider