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

Any ideas on how to link someones input to your output gui?

Asked by
Xoqex 75
8 years ago

Hey guys, so I'm working on a fun little GUI where Player2 can type something in a Textbox, and then what they type shows up on my local GUI.

My current failed setup is they have the GUI with two text boxes and then in their backpack is a string value. I attempted to use a~~~~~~~~~~~~~~~~~changed:connect()~~~~~~~~~~~~~~~~~ for the string values so the value changes to the input from the text boxes, then my TextLabels on Player1 update to the string values when they update...But the stringvalue doesn't update so nothing works.... Any ideas?

1 answer

Log in to vote
1
Answered by
BlueTaslem 18071 Moderation Voter Administrator Community Moderator Super Administrator
8 years ago

Look at the documentation for TextBoxes on the Wiki. Using documentation is very important for programming.

Here's what should stand out:

FocusLost ( bool enterPressed, InputObject inputThatCausedFocusLoss ) Fired when the client lets their focus off the TextBox. The enterPressed argument is true if the client pressed Enter to lose focus.

So this event should fire whenever the textbox is done being edited. The first parameter tells you whether they're done by pressing enter (as opposed to clicking outside)

textbox.FocusLost:connect(
    print("said:", textbox.Text)
end
Ad

Answer this question