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...
Make sure you are using a local script.
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)