Textbox not returning Text property

For some reason this Textbox is returning " " for the Textbox.Text when the text is not " ".

image
This is the line I need to get working. This is running on a server script acting on a GUI on the client. It’s meant for an admin console so nothing is handled on the client besides input to open the GUI. It’s nothing to do with the variables as I even tried printing the text from a script inside the textbutton which returns the same thing.

You should probably not script UI on the server. Its better to do it on the client and then fire a remote event to the server.

The Text property is a string. If you want to check if the text isn’t empty and isn’t just spaces then do

if not conf.box.Text:match("^%s*$") then

and yea always code UI on the client

The entire UI is working completely fine besides this. It already uses remote events to communicate with the client but not for things related to bans and ban datastores

It already checks if the text is empty. The issue is its not returning the actual property value.

also the image posted with the hyperlink was run on the client and returned the same string " "

Are you using a server script?

If ur talking about the script with the while loop, no, but I moved all the UI input code to a local script and it fixed my issue.

1 Like