It's going to be a single-player game and I'm trying to make the surface GUI on a door be set to local players name but it isn't working
local player = game.Players.LocalPlayer.Name script.Parent.Parent.TextLabel.Text = player
If its a single player game you can just get all the players in the game(1) and chose the first player(you), so it might look like this
local players = game.Players:GetPlayers() surfaceGui.TextLabel.Text = players[1].Name