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

Why isn't the text of the TextBox showing in another TextBox?

I made a surfaceGUI with a TextBox, and I wanted to be able to input text directly into the TextBox - unfortunately this feature is locked. So instead, I tried to make a script which launched a GUI with a TextBox, and the text entered into the GUI TextBox would appear on the surfaceGUI TextBox.

Here's the script that's in the surfaceGUI TextBox - fairly simple - which won't take the text:

while true do
script.Parent.Text = game.Workspace.GuiGiver.GUI.TextBox.Text
end

Am I using the wrong "repeat" loop?

2 answers

For a while loop, you should use a wait() statement for it can crash the game from infinitely looping without any time between each iteration. To fix this, just add in wait() between line 1 and line 2. If you have any other questions, just leave a comment and I can help.

2 comments

0

Thanks for the help - the wait() fixed my crashing problem,

0

But the surfaceGUI TextBox still won't display what I type into the GUI TextBox in-game. Thanks in advance.

When writing a Script you need to write it in a Way where Studio Can Read It, for Example, When you put script.Parent.Text = ,Normally, Studio would see it as a quote, Lets say I want to add a Little Script in the Text, in this Case we would need two dots like this .., Now lets move on to the Script

gui = script.Parent -- Just to be simple, and Clean
gui2 = game.Workspace.GuiGiver

--I won't be using a Loop
gui.Text = ""..gui2.Gui.TextBox.Text--Remember that the .. means INCLUDE

Hope this helped!

5 comments

0

Hi, thanks for the help, but the surfaceGUI textbook still isn't updating LIVE IN-GAME when a user inputs text into the GUI textbox. Thanks, iAviate

0

accept the answer pls

0

It doesn't really answer the question

0

Easy, Use the Changed event.

0

It still doesn't work

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