What do you want to achieve?
I would like to create a list of buttons, each one containing the username of a player in the server, and updating as new players join and leave.
What is the issue?
My script fails on the first line , according to print debugging.
What solutions have you tried so far?
I have tried creating a button without player names attached, it worked fine. The script is breaking from me trying to connect it to players for some reason.
plr = game.Players.LocalPlayer
wait() -- Waits so there is a Player to add the TextFrame
button = Instance.new("TextButton") -- Change this if you like
button.Parent = plr.PlayerGui.Main
button.Size = UDim2.new(0,100,0,100) -- Sets to Default Size
button.Position = UDim2.new(0.5,0,0.5,0) -- Sets Position
button.Text = plr.Name
button.Name = plr.Name
print("worked")