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

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

Asked by 3 years ago
Edited 3 years ago

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)
0
yes Eric_pokemon 133 — 3y
0
got it working Eric_pokemon 133 — 3y

2 answers

Log in to vote
1
Answered by
Pupppy44 671 Moderation Voter
3 years ago

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
0
ty xD DuckyRobIox 280 — 3y
0
oH Eric_pokemon 133 — 3y
0
still doesn't work Eric_pokemon 133 — 3y
0
I could make a event Eric_pokemon 133 — 3y
View all comments (3 more)
0
Do you have a BoolValue as a child in the textbox? and if it's true Pupppy44 671 — 3y
0
yeah I fixed it Eric_pokemon 133 — 3y
0
I added a while true do then make the bool value switch from false and true Eric_pokemon 133 — 3y
Ad
Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

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

0
it won't print the thing that I type Eric_pokemon 133 — 3y
0
it's only printing the original text Eric_pokemon 133 — 3y
0
Oh lemme edit it then DuckyRobIox 280 — 3y
0
Now try DuckyRobIox 280 — 3y

Answer this question