Hello, I am FriendlyBuilder24 and I have recently made a Login System for my Admin Panel but something is wrong. When I enter the correct information on the Login and press the Login Button it doesn’t work!
(tried to show a video but didn’t work)
Can someone please help me fix this problem? My script is below and I’ll check Output to tell me if something is wrong!
local login = script.Parent.Parent.LoginButton
local username = login:FindFirstChild(“username”)
local token = login:FindFirstChild(“token”)
script.Parent.MouseButton1Click:Connect(function()
if username.Text == “Administrator” and token.Text == “Admin Panel” then
local panel = script.Parent.Parent.Parent.panel
panel.Visible = true
script.Parent.Text = "Login Successful!"
wait(2)
script.Parent.Visible = false
script.Parent.Parent.title2.Visible = true
else
script.Parent.Text = "Invalid"
wait(2)
script.Parent.Parent.title2.Visible = false
script.Parent.Visible = false
end
end)
Line 6 is the part where it says if username.Text == “Administrator” and stuff