How to make text box only for usernames

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    So i have a report gui i made but im not sure how to make Name text box only valid for usernames. So lets say I type “chickens” but player username is “chickenz” it would be invalid. If i write “chickenz” and player username is “chickenz” it will be valid.
  2. What is the issue? Include screenshots / videos if possible!
    So im not sure were to start and how to since im new to roblox scripting.
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    So i tried finding yt vids, devforum but just couldn’t find what i was looking for.


image

not sure if these are helpful pics

1 Like

something to do with this IG

if game.Players:FindFirstChild(NameText.Text) then
    print("Valid")
else
    print("no"
end
1 Like

I would first advise you to learn about the basics of scripting first, if you haven’t.

But either way, are you trying to make it so it only detects the username of the players in game?

Yeah because people been trolling

Hi! Here is the whole process

  • Have a GUI with a textbox on the client.
  • When the client is ready to send the username to the server, fire a remote in the clientscript, with the text in the textlabel
  • When the server recieves the remote signal, check if the value sent is present (not nil), and is a string.
  • If it is present and a string, check if any currently playing player is named the same as the string
  • If a player is named the same as the string, do something to that player.
  • If not a player, send a remote back to the client, this can then show an error on the clients gui.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.