Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

Gui script not working only kicking me any help? (This is a login gui someone requested)

Asked by 6 years ago

Why won't this work? All this does is kick me. Why doesn't my login script for a gui work? It kicks me even thought I type in test and I have all the things in the gui I have Login.Username and all of those by why won't it work? `local Username = game.Players.LocalPlayer.PlayerGui.TEST.Login.Username local Submit = game.Players.LocalPlayer.PlayerGui.TEST.Login.Submit local tries = 0 local left = 5 local maxtries = 4 game.Players.LocalPlayer.PlayerGui.TEST.Login.Submit.MouseButton1Click:connect(function() if tries == maxtries then game.Players.LocalPlayer:Kick() else

if game.Players.LocalPlayer.PlayerGui.TEST.Login.Username == "test" and game.Players.LocalPlayer.PlayerGui.TEST.Login.Password == "test" then
    game.Players.LocalPlayer.PlayerGui.TEST.Login.Username.Visible = false
    game.Players.LocalPlayer.PlayerGui.TEST.Login.Submit.Visible = false
    game.Players.LocalPlayer.PlayerGui.TEST.Login.Password.Visible = false
    game.Players.LocalPlayer.PlayerGui.TEST.Login.Login.Visible = false
    game.Players.LocalPlayer.PlayerGui.TEST.Login.Hide.Visible = false

    game.Players.LocalPlayer.PlayerGui.TEST.Login.Main.Visible = true


else
    tries = tries + 1
    left = left - 1
    print(left .. " more tries left until kick.")
end
end
end)

`

1 answer

Log in to vote
0
Answered by
Hakurem 30
6 years ago

game.Players.LocalPlayer.PlayerGui.TEST.Login.Username is a textlabel i assume. Try game.Players.LocalPlayer.PlayerGui.TEST.Login.Username.Text == "test" game.Players.LocalPlayer.PlayerGui.TEST.Login.Password.Text == "test"

hope this helps

0
text box WilliamproYT999999 4 — 6y
0
ok yeah oc since you check what people type in. Did you try the above? Hakurem 30 — 6y
0
yeah I did it didn't work WilliamproYT999999 4 — 6y
Ad

Answer this question