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

How can I combine functions with textbuttons?

Asked by 9 years ago

So if I was to create a textbutton, how would I make it so when they are finished typing in the text of a player, and press enter it checks to see if the player's in the game ( a for loop ), and if it is it adds a checkmark to the right of the player ( imagelabel + fadein with transparency ). So I know how to make all the stuff pop up, when the scan is finished and it's found the player. I just don't know how to make the scan start when that player presses enter on a textbutton and has typed a correct username in.

2 answers

Log in to vote
0
Answered by 9 years ago

You need the (TextBox.FocusLost)[http://wiki.roblox.com/index.php?title=API:Class/TextBox/FocusLost] event.

To see if the textbox has the name of a valid player, simply use game.Players:FindFirstChild(textboxValueHere) and see if it returns nil or a player.

Ad
Log in to vote
-2
Answered by
Hexcede 52
9 years ago

I don't know what you are even saying. :3

Answer this question