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

How would I make a password script?

I want to make a script where the screen says "password" and you click it and enter a given password and press enter and if it's right, it does something else. How would I make this happen? I know screen GUIs won't let you type stuff into it, but if I connected a different script that you COULD type into on top of the password box and let you type into there, would it work?

1 comment

1 answer

✓ Accepted answer

There is another type of gui that can use textBoxes. As for the password, you do that like this.

textBox = --put a textBox here
code = "Codey" --the code

textBox.FocusLost:connect(function() --fires when the player de-selects the box
	if textBox.Text:lower() == code:lower() then --:lower() is the text in all lowercase
		print"They typed it right!"
	else print"they typed it wrong :("
	end
end)

TextBox, FocusLost, and string.lower().

1 comment

0

Slow down I:<

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