Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I make something print the text from a textbox?

So I'm trying to make it so if you type something in the text box it will print the text is there a solution? this is a local script btw

local textBox = script.Parent


textBox.ReturnPressedFromOnScreenKeyboard:Connect(function()
	local text = script.Parent.Text
	print(text)
end)

2 comments

0

yes

0

got it working

2 answers

✓ Accepted answer

Fixing Ducky's script:

local bool = script.Parent.Boolvalue
local textBox = script.Parent
local text = script.Parent.Text

while bool.Value == true do
wait(1)
local text = script.Parent.Text -- Puts the text variable here so the text is updated to the current text. Putting it before the while do will not make it update
print(text)
end

7 comments

0

ty xD

0

oH

0

still doesn't work

0

I could make a event

0

Do you have a BoolValue as a child in the textbox? and if it's true

0

yeah I fixed it

0

I added a while true do then make the bool value switch from false and true

alright if you want you can make a bool value and then set it to true so when you dont want it to print the text you can make it set to false

local bool = script.Parent.Boolvalue
local textBox = script.Parent
local text = script.Parent.Text

while bool.Value == true do
wait(1)
print(textBox.Text)
end

Alright if you want something else tell me and ill change it accept if helps

4 comments

0

it won't print the thing that I type

0

it's only printing the original text

0

Oh lemme edit it then

0

Now try

This discussion is preserved as it was. New answers, comments, and votes are closed.