Hello there, I'm quite new to this field. I was thinking of creating a register with a Surface GUI. My attempt is to display the the local player's username when the "login" button is clicked. This is how I completed;
script.Parent.Frame1.Username.Text = ("Username:" .. game.Players.LocalPlayer.Name)
script.Parent.Frame2.LoginButton.MouseButton1Click:connect(function()
print(game.Players.LocalPlayer.Name)
end)
Username = The text label for Frame1. My expected output.
LoginButton = A text button for login.
Sadly, my expected output isn't printed in Frame1,
Is there something wrong with the concatenation and string?
Thank you.

5 comments
Is this a local script? Where is this script placed?
Debug your script with print function. At the top add a print, to make sure the script is actually running. Make sure it's not disabled and that it's a LocalScript.
This is in a local script.
Is it disabled?
It's active, I think something is wrong with the Text button or Mouse connect. I'll update soon by changing the frames.