Help with simple ScreenGui issue

In this script, I attempt to connect a function to a TextBox that prints whatever the player inputs into the said TextBox. Instead, nothing prints out. It is blank.

image

Things to know:

  • Messager is a ScreenGui.
  • The lines including TextLabels are just Quality-of-life-type features.

Typo here
image

The script thinks you’re trying to do this player.Name("!"), fix it by concatenating it properly

..playerName.."!"

This probably has to do because the code doesn’t constantly check if the player even typed anything

Good point, how do I check that?

Could you please send the script that has to do with typing messages?
Or is this script the one that controls that as well? I just don’t see that

1 Like

This is the script that controls it as well. I’m completely new to ScreenGui so I could be missing out on something very obvious. I’m not sure how to continuously check if a player clicks on the button.

Ok try this then:

textBox.Text = string.sub(0, string.len)
if textBox.Text == " " then
    repeat wait(0.1) until textBox.Text ~= " "
    print(textBox.Text)
1 Like