Ok... I know I asked this before... but I haven't figured it out yet so I need some help. When the TextButton is clicked, I need to find the name of the player who clicked the Button, then a Frame with the player's name will turn green. Here's the code I tried:
local Players = game:GetService("Players")
local Player = Players.LocalPlayer
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent.PlayerStats[Player.Name].BackgroundColor3 = Color3.fromRGB(0, 255, 0)
game.ReplicatedStorage.Values.PlayersReady.Value = game.ReplicatedStorage.Values.PlayersReady.Value +1
script.Parent.Visible = false
end)
This is not a LocalScript and it is not working. Do I need to use some kind of RemoteEvent? Could use some help. Thanks.

7 comments
For everybody
You won't need a remote event if you use a player added event with the parameter of player/plr and then get the mouse button click, then make the GUI visible and use player.Name/plr.Name for the player name.
...Please just run that Script through with me
I can't post another answer
Aww
put a mouse button click function inside a player added event function and inside the mouse button click function do game.PlayerGui.GUI.Frame.Text = player.Name, and on the next line do game.PlayerGui.GUI.Frame.Visible = true. Make sure to accept this answer if it helped.
Nope, Didn't work