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

How to make a script that can tell if there is Text in a textbox?

Asked by 5 years ago
Edited 5 years ago

Here is my code:

game.CoreGui.LsZmKQp.Frame.TextButton.MouseButton1Click:Connect(function()

if TextBox.Text then

TextButton.Text = ("Check Developer Console with F9")

wait(2)

TextButton.Text = ( "Encrypt")

print(TextBox.Text) else

print("You need to type something in the Textbox!")

end

end)

I need to know how to make a Script that can tell if there is text in a textbox

0
if not TextBox.Text == "" then Mr_Pure 129 — 5y

1 answer

Log in to vote
1
Answered by
Joshument 110
5 years ago

If a textbox has no text, it's text would be considered "", otherwise a string value that contains nothing, so you could easily do this: if not TextBox == "" then if not is pretty much the same as saying if TextBox ~= "" then

Ad

Answer this question