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

How do I detect when a GUI Textbox's text changes?

Asked by
Validark 1580 Snack Break Moderation Voter
10 years ago

I want to be able to enter a name of a player, then after I enter the name it will automatically run my script onto the player.

I have a TextBox GUI that you are supposed to enter the name into. But instead of having another button to click "Go" I would rather have it automatically execute.

If you are curious, it will automatically display a picture of that person.

2 answers

Log in to vote
1
Answered by
Azarth 3141 Moderation Voter Community Moderator
10 years ago

Use the Changed event.

script.Parent.Changed:connect(function()
    if game.Players:findFirstChild(script.Parent.Text) then 
        print("execute")
    end
end)
Ad
Log in to vote
0
Answered by 10 years ago

Hmm, I would probly use GUINAME.FocusLost:connect(function() end) 'Use for TextBoxes' for it, but the coding for GUIs currently aren't working right now, I'd wait a while after Roblox fixes the coding for GUIs, because right now the coding isn't working and is broken at the moment, but it may be back up soon. Hope this helped!

Answer this question