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 5 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 5 years ago
Edited 5 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
5 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
5 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.

1local function getPlayerFromName(name)
2   for _, player in pairs(Players:GetPlayers()) do
3      if player.Name:lower() == name:lower() then
4        print(player.Name)
5        return player
6      end
7   end
8end

Answer this question