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.
Why do you have Text = ("")?
script.Parent.Frame1.Username.Text = "Username: " .. game.Players.LocalPlayer.Name script.Parent.Frame2.LoginButton.MouseButton1Click:Connect(function() print(game.Players.LocalPlayer.Name) end)