[UNSOLVED] Name Tag Disappearing After Reset

Hello,
I have a name tag script here, and everything works fine. The only problem is when you reset, output turns this error:

ServerScriptService.MainHandler:6: attempt to index nil with 'Head'

I am unsure why this is happening. I tried changing line 1 on the script to:

player.Character.Head

But it doesn’t work.

Here is the script in server script service:

game.Players.PlayerAdded:Connect(function(player)
	local clone = script.RPName:Clone()
	clone.Parent = game.Workspace:FindFirstChild(player.Name).Head

	
	
	player.CharacterAdded:Connect(function()
		local clone = script.RPName:Clone()
		clone.Parent = game.Workspace:FindFirstChild(player.Name).Head
		local human = player.Character:FindFirstChild("Humanoid")
		
			
		end)
	end)
local players = game:GetService("Players")

players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		local head = character:WaitForChild("Head")
		task.wait()
		local clone = script.RPName:Clone()
		clone.Adornee = head
		clone.Parent = head
	end)
end)

CharacterAdded’s parameter represents the character model that was added.

Why cant arent you using the player’s character instead of finding the character in workspace?

I tried that. It wasn’t working.

Thank’s a lot. Worked greatly.