I made a script in a sign with a textlabel and put the script in it containing this:
local name = game.Players.LocalPlayer.Name script.Parent.Text = ("Thanks to "..name.." for playing the game!")
but I keep getting the error : Workspace.Spawn.Sign.Text.SurfaceGui.TextLabel.Script:1: attempt to index nil with 'Name'
The problem is that you are not using a local script.
LocalPlayer can only be accessed in a local script. You will have to go about this in another way. I'm not sure how you are going to choose whos name you want to display, but here is a script that will display the name of the most recent player to join:
game.Players.PlayerAdded:Connect(function(plr) script.Parent.Text = ("Thanks to ".. plr.Name.. " for playing the game!") end)
Hope that helped, if you want it to work differently leave a comment and I'll see what I can do.