This code isn't working:
if key_code == 13 then game.Players.PlayerAdded:connect(function(Player) game.Workspace.Billboard.Screen.Front.Label1.Text = Player.Name.." pressed the button" end)
I'm getting this error: "attempt to index field 'Name' (a string value)"
I'm pretty sure this code is really messed up but I just want it to say "[Player name] pressed the button" when a player presses key code 13.
First of all, your code makes no sense at all. PlayerAdded is for when a player joins the game, so your code would never even work. I have changed your code to work.
local player = game.Players.LocalPlayer if key_code == 13 then game.Workspace.Billboard.Screen.Front.Label1.Text = player.Name .. " pressed the button." end