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

Making text box text print in the output?

Asked by 6 years ago

I'm wondering how I would make it so that when a player types in the text box it prints what they typed in the developer console/ output. I'm not asking for scripts or anything, I'm just asking for guidance. Thanks

2 answers

Log in to vote
0
Answered by
Vulkarin 581 Moderation Voter
6 years ago

There's an event of textbox called FocusLost:

You could add a local script inside of the textbox like so..

local textbox = script.Parent

textbox.FocusLost:Connect(function(bool)
    if not bool then return end
    print(textbox.Text)
end)

The boolean value represents whether they pressed enter or not, the script is setup to exit the function if the textbox was left in any method other than by the enter key (i.e. clicking outside of the textbox)

Ad
Log in to vote
0
Answered by 6 years ago

Its pretty easy just do:

local output = textbox.text
print(output)

But thats assuming you made a value called textbox.

0
didnt work Gamersofthegodss 11 — 6y
0
can i see your script? 20002000sa 83 — 6y

Answer this question