Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you detect what is inside a TextBox?

Asked by 4 years ago

I am trying to make a Hotel Check-In System and I was trying to make a text box that when the submit button is clicked, it would search all the players for the username. But I can't even figure out how to get the submit button working or how would it even work. I am very stuck right now! Thanks in advance!

3 answers

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

As far as I am aware, using :GetPropertyChangedSignal() might be your best bet. Here is the Link. Hope this helped!

Ad
Log in to vote
0
Answered by
haba_nero 386 Moderation Voter
4 years ago

Shoot me a friend request @TheLastHabanero on Roblox and I can help you in real-time. I cannot give you the answer in writing. I can show you how to do it. Ill do it for free this afternoon if you want.

Log in to vote
0
Answered by
palav 104
4 years ago

From what I'm getting, you want to put a player's name into a textbox, and check if that player exists. If so, you can use this function.

Pass textbox.Text into the function.

local function getPlayerFromName(name)
   for _, player in pairs(Players:GetPlayers()) do
      if player.Name:lower() == name:lower() then
        print(player.Name)
        return player
      end
   end
end

Answer this question