Hello there!
I was thinking of making a register GUI. I was expecting to make a "Login" button and the display button, where it would display the username of the local player.
This is how I started;
script.Parent.Username.TextLabel.Text = "Loading"
This is what I want, before pressing the login button. So to continue;
game.Players.LocalPlayer.PlayerGui.ScreenGui.Login.TextButton.MouseButton1Down:Connect() game.Players.LocalPlayer.PlayerGui.ScreenGui.Username.TextLabel.Text = "Logged by " .. game.Players.LocalPlayer.Name
So this is where I got confused, It is correct that the script ignores the first line and goes with the third one. I couldn't create a relationship between the "function" and the output. So, my login text button wouldn't execute the function.
I would also like to know the difference between MouseButtonDown and Click.
I'm really sorry if you found this annoying. This is the only hope where I could get a valid reply.
Thank you for reading this.
Hello, SW33TSTUFF !
yes, it is normal to ignore...
You have to call a function on the clicked event:
game.Players.LocalPlayer.PlayerGui.ScreenGui.Login.TextButton.MouseButton1Down:Connect(function() game.Players.LocalPlayer.PlayerGui.ScreenGui.Username.TextLabel.Text = "Logged by " .. game.Players.LocalPlayer.Name end)
This will work now
Good Luck with your games