Hello, I have a really small but irritating problem.
With this code:
script.Parent.TextButton.MouseButton1Down:Connect(function(Player) print(Player) end)
I get a number value instead of the name of the player who clicked it.
Why?
Assuming this is in a local script The MouseButton1Down Event does not return Player and the only person who would be clicking that button is the client the GUI is being displayed on so to get the player you can simply just do this:
local Player = game.Players.LocalPlayer -- This is the client the GUI is being hosted on script.Parent.TextButton.MouseButton1Down:Connect(function() print(Player.Name) end)