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

How do I transfer the text from TextBox to TextLabel?

Okay, so I have a TextBox that the player has to enter text into. And then that text will appear on a TextLabel that the player cannot edit. I thought it was just gonna be something simple.. for example

script.Parent.Text = (script.Parent.Parent.TextBox.Text)

is there a way I can make this work?

5 comments

0

It should be as simple as that, you just don't need the ()

0

well it isnt working.. im pretty sure its because the text box is wonky

0

are you trying to update it the instant the text box changs or something like you type and then submit?

0

i want it to submit

0

in that case you wouod need to create a guibutton. i think you should check out some of the tutorials here:https://developer.roblox.com/learn-roblox/user-interface

2 answers

So pretty much what @bittersweetfate did, except put it into a local script:

while wait(0.5) do
	script.Parent.Text = script.Parent.Parent.TextBox.Text
end

Just put that code into a local script, and you're done!

2 comments

0

why wouldn't it be in a local script?

0

Because Doctor Chill Might not have put it into a local script.

This forum post may help you

Just basically do what the above said and maybe have and event that fires everytime the text is changed

On a localscript

textgui = script.Parent.Text
texbox = script.Parent.Parent.TextBox

textbox.GetPropertyChangedSignal("Text"):Connect(function()
-- code
end)

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