##Problem
The problem is one script is assigning a string (the TextBox's Text) to a variable which never gets updated. The script is run remembering the value of the TextBox's Text.
local User = script.Parent.Parent.TextBox.Text
This result gets remembered in the script and when your event executes, you're telling it to print out that remembered result. Which would be an empty string.
##Solution
You can do this in a variety of ways. You can change the script to how you have it where it goes through the TextBox and Text property directly, or you can reference the TextBox as an object prior to your event and reference the object to get to the Text property.
local User = script.Parent.Parent.TextBox
script.Parent.MouseButton1Click:Connect(function()
print(User.Text)
end)
######Hopefully this solved your problem. If it did, hit the accept answer button. If it didn't please ask your questions in the comments and I'd be able to help you.
2 comments
Actually, he uses the Text property in both of his scripts. The real problem lies in where he assigns the variable and what he is assigning that variable to.
I am aware. The two versions of what the variable User can be come from me. In my script I have a expression for User that he didn't use. I was simply pointing out why I made the change.