I have a problem with my game’s team creation. It’s that people can just put a " " as their team’s name and I don’t know how to stop it. I have searched for a while and I haven’t found a answer to this.
I’m assuming you’re receiving text input from a textbox (or similar).
if string.find(TextBox.Text, "^%s*$") then --Matches empty strings and strings containing only whitespaces. --Do code. end
This is definitely a better way to do this I’m gonna remove my comment.