I made an in-game message GUI. However, I don't want it to be able to appear blank so how would I make it so the GUI checks if there's actually at least one letter in the textbox before everyone can see it?
The script goes something like this and it's a localscript underneath ScreenGui:
sp=script.Parent msg=workspace.GameMessage --string value msger=msg.Sender --also string value gui=sp.MsgGui textbox=gui.TextBox --where the message can be inputted
gui:WaitForChild("SendButton").MouseButton1Down:connect(function() if textbox.Text~=" " then --this is the part I'm talking about where I don't want it to send if it contains only spaces msg.Value=textbox.Text msger.Value=game.Players.LocalPlayers.Name else end

3 comments
So would the script go something like this: gui:WaitForChild("SendButton").MouseButton1Down:connect(function() withoutSpaces=str:gsub("%s","") if #withoutSpaces>= then msg.Value=textbox.Text else end end)?
Yea, it would look something like that.
Alrighty, thank you. You were great help!