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

My simple gui textbox input system not working?

I have a simple gui project that makes a user enter something in a textbox and when they click a button it will output on console. For some reason this dosen't work.

Script:

local textbox = script.Parent

local button = script.Parent.Parent.TextButton

button.MouseButton1Click:Connect(function()

      print("user entered:".. textbox.Text)

end)

It outputs nothing...

2 comments

0

Script type?

0

What is your Script Type?

2 answers

✓ Accepted answer

Make sure you are using a local script.

1 comment

0

Comment it, don't answer.

i see your problem. your using print to change the textbuttons text. so it would be

local textbox = script.Parent

local button = script.Parent.Parent.TextButton

button.MouseButton1Click:Connect(function()
	script.Parent.Text = "User Entered"
end)

or if you trying to print in the output, it would be

local button = script.Parent.Parent.TextButton

button.MouseButton1Click:Connect(function()
	print("User Entered")
end)

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