Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

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

3 comments

0

text box

0

ok yeah oc since you check what people type in. Did you try the above?

0

yeah I did it didn't work

This discussion is preserved as it was. New answers, comments, and votes are closed.